oibo8x / subsonicproject

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

ExecuteTypedList<Guid>problem #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. For this code  
SqlQuery query = new Select("guidId").From("Table")
   List<Guid> list = query.ExecuteTypedList<Guid>();
2. Examining the list variable is a list of Guid but the values of this 
guids are 0000-0000-00000-000000. Note : The Count of the list is the 
correct one. 

What is the expected output? 
A list of Guids that are not 00000-000-0000000... 
What do you see instead?
A list of Guids that are 00000-000-0000000...

What version of the product are you using? On what operating system?
SubSonic 2.1.1 on XP Pro x64

Please provide any additional information below.
THere is a unit test for ExecuteTypedList<T> but is just for Subsonic 
types. The part of the ExecuteTypedList<T> for built in types is not 
exercised by the unit test.
I hope tomorrow I will have time to submit the change.

Original issue reported on code.google.com by harapu on 28 Jan 2009 at 6:01

GoogleCodeExporter commented 9 years ago
I think this has been fixed - this test works for me:
        [Test]
        public void Select_With_ExecuteTypedList_Should_Work_With_List_of_Guid() {

            List<Guid> list = new Select("ProductGUID").From<Product>
().ExecuteTypedList<Guid>();

            Assert.AreNotEqual(Guid.Empty, list[0]);

        }

Note that I have a Guid field in my Northwind DB

Original comment by robcon...@gmail.com on 9 Apr 2009 at 2:19