You are not logged in.
Pages: 1
I just notice that if a TOrm derived object has a property of type Tdate then when adding-saving it in the database (mariadb) through zeos I am getting crazy dates in the future.
For example 21-07-1975 is transformed in the insert query as '2759-01-01'
If I change the property to Tdatetime type, the date in the sql query is shown ok ('1975-07-21')
In the database it is created as Date field.
I noticed that in TOrm.AppendAsJsonObject a Tdatetime property is going through TOrmPropInfoRttiDateTime.GetJsonValues and TTextDateWriter.AddDateTime. In contrast, a Tdate property is going through TOrmPropInfoRttiDouble.GetJsonValues
Are Tdate type valid for Torm properties?
Thank you in advance
Offline
Did you try with TDateTime?
With Tdatetime, as I wrote, there is no problem
Offline
So yes, TDate is not supported.
It sounds like if a plain TDate is just like a plain double, so work with the ORM and/or ZDBC is consistent.
It is documented as such IIRC.
At least, only TDateTime and TDateTimeMS are documented to be properly supported by our ORM and our DB layer.
Offline
Pages: 1