I'm using nhibernate as my ORM and Firebird embedded as the database. How would I got about saving a DateTime to the database?
This is an example definition of a class.
[Class(Table = "table")]
public class Table
{
private int mId;
private DateTime mDate;
[Id(Name = "Id"),Generator(1, Class = "native")]
public virtual long Id
{
get { return mId; }
set { mId = value; }
}
[Property]
public virtual DateTime Date
{
get { return mDate; }
set { mDate = value; }
}
}
I'm guessing that I have to specify something in the Property attribute but I don't know what.
When trying this mapping I get the follwoing error:
FirebirdSql.Data.FirebirdClient.FbException: Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 63 Date