Yitzchok / subsonicproject

Automatically exported from code.google.com/p/subsonicproject
0 stars 0 forks source link

2.2 Doesnt seem to support SQL Server 2008 DateTime2 and Date #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Table in SQL Server 2008 
2. Add a DateTime2(7) column
3. Add a Date column

What is the expected output? 
The Subsonic class should contain a DateTime type property for each column.
What do you see instead?
The Subsonic class contains a string property for each column.

What version of the product are you using? On what operating system?
Latest SVN

Original issue reported on code.google.com by geoff...@sa.chariot.net.au on 27 Apr 2009 at 11:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
taken from http://forums.subsonicproject.com/forums/t/4008.aspx

CREATE TABLE [dbo].[Test](
    [id] [bigint] IDENTITY(1,1) NOT NULL,
    [datetimen] [datetime] NULL,
    [dates] [date] NULL,
    [times] [time](7) NULL,
    [datetimeNew] [datetime2](7) NULL,
 CONSTRAINT [PK_Test] PRIMARY KEY CLUSTERED 
(
    [id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, 
ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

Now generate a class with Sonic and have a look at the output.
The new data types are defined as string properties and cause cast errors.

Original comment by geoff...@sa.chariot.net.au on 28 Apr 2009 at 2:06

GoogleCodeExporter commented 9 years ago

Original comment by canof...@gmail.com on 4 May 2009 at 7:18

GoogleCodeExporter commented 9 years ago
Thanks for the report! The problem has been fixed and will be reflected in
my next check-in...

Original comment by canof...@gmail.com on 4 May 2009 at 8:35

GoogleCodeExporter commented 9 years ago
Fixed in Revision 522.

Original comment by canof...@gmail.com on 4 May 2009 at 9:07