type="Date" -- Fabio Maulo
El 16/08/2010, a las 16:30, MattO <[email protected]> escribió: > We are using DB2 (iSeries /AS400 old mainframe type). Some fields are > marked as Date fields. They do NOT accept time values and if you do > provide them you get data conversion errors. > > How do you map these with nHibernate? Right now my HBM looks like > this: > > <property name="CBTVFYCUTD" column="CBTVFYCUTD" not- > null="true"> > <column name="CBTVFYCUTD" sql-type="date" /> > </property> > > My .NET Property looks like this: > > private DateTime _CBTVFYCUTD = new DateTime(); > public virtual DateTime CBTVFYCUTD > { > get { return _CBTVFYCUTD; } > set { _CBTVFYCUTD = value; } > } > > When the object gets persisted to the database using an INSERT > statement after calling .Save() in nHibernate it sends the data WITH > the time value and causes a data conversion error with the DB2 > driver. I do not want the time value to be sent. How can I get it so > the Time value is never sent and only the date value? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
