This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hey guys :-) Just playing with version 0.5 and thought I'd feed back a few bits and pieces: - I noticed the user PDF is incomplete - only seems to go to page 13 and then abruptly stops. They may be things you already know about but I thought I'd feed them back anyway :-) Good work on the latest build! James |
|
|
[quote user="james"]- When setting DateTime fields make sure that the value is between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM for MsSql2005. Currently an object will register as valid if the date is outside these ranges and then break going into the db.[/quote] What issue are you experiencing in particular? This test is passing for us: private class EntityWithDateTime : Entity<int> Cheers, Andrew. |
|
|
[quote user="james"]HiLo needs to be renamed to KeyTable[/quote] Where? :-) |
|
|
Hey Andrew! The HiLo just needs to be renamed in the sample scripts PokerSchema.sql. I didnt run up the sample but found my solution failing if my old HiLo table wasnt named KeyTable - figured the sample would as well :-) As for the date time test - do I need to have the attribute ValidatePresence? If I dont have it and its not a nullable datetime then shouldnt if auto validate? Currently it will try and stick an empty datetime in but that will always break with sql. Shouldnt this case always cause validation to fail even without the attribute? Cheers, James |
|
|
[quote user="james"]The HiLo just needs to be renamed in the sample scripts PokerSchema.sql. I didnt run up the sample but found my solution failing if my old HiLo table wasnt named KeyTable - figured the sample would as well :-)[/quote] Cheers. [quote user="james"]As for the date time test - do I need to have the attribute ValidatePresence? If I dont have it and its not a nullable datetime then shouldnt if auto validate? Currently it will try and stick an empty datetime in but that will always break with sql. Shouldnt this case always cause validation to fail even without the attribute?[/quote] You need that attribute. For non-nullable value types we don't try and determine whether the initial value is valid for a particular dbms. Hope this helps, Andrew. |
|
|
[quote user="james"] - When setting DateTime fields make sure that the value is between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM for MsSql2005. Currently an object will register as valid if the date is outside these ranges and then break going into the db. [/quote] An idea I had to improve this sort of validation is for Lightspeed to convert the DateTime into a SqlDateTime explicitly when putting the SQL command together, and assigning that to the parameter. This conversion happens internally anyway but doing explicitly means that Lightspeed could give some information about which column caused the error. You could add CreateDateTime, CreateInt32, etc to the IDataProviderAdapter interface and then implement them using each database's different providers. |
|
|
I have added automatic date range validation in 0.6 Cheers, Andrew. |
|