I ran into a bug with version 3.0.0.3 and the linq templates. The one where Update was a null object. So I downloaded the latest source for Subsonic.Core from git (merge branch from eibrahim Nov 3 2009). I built the source and am using the latest dll in my project. It has fixed the problem with running Update queries but now I have another problem with Insert.
The insert always seems to insert in US date format. My DB, IDE and OS are all set for UK date formatting (dd/mm/yyyy). Insert always inserts in (mm/dd/yyyy) and is throwing exceptions because of invalid dates.
Here's the formatting of my insert:
_db.Insert.Into<db.mytable>(s => s.mydatetime, s => s.othercolumns).Values(myDateTime, otherValues).Execute();
I've pulled the day and month values out of the DateTime I am passing into the Insert query and it's definitely in dd/mm/yyyy going in. I have seen some posts on the SQL Server 2008 Date issue, but I am definitely using datetime and not null columns in my DB. The work around I am using is to do an Insert and use dummy datetimes that won't cause an exception, and then run an Update. Running Update stores datetimes in the correct format!
Also, where can I find the latest version of the .tt and .ttinclude template files?
Pleeease can the Subsonic 3 download (3.0.0.3) on subsonicproject.com be updated to include the latest version of the dll and the latest versions of the .tt and .ttinclude files including repository.tt? Possibly a version 3.0.0.4?
It has cost me a lot of time debugging template file issues with another project using MySQL. i haven't been able to find a copy of repository.tt. Then the Update bug.. now an Insert issue.. If the package download was updated it would save many others having to go through the same. Subsonic is a great tool and most of the teething issues with version 3 have been fixed as I understand, but the V3 package still has the bugs.
Thanks in advance.