Hi,
I have a column in a NexusDB table that is defined as a Date. A have set it as a TDate in the applicable entity entries but when I do a $filter on it in Swagger it fails as the query is still using timestamp instead of date. If I change the underlyying column type in the Nexus table to be a DateTime it works fine but I don't really want to do that. Please see below.
Thanks,
Ken
[Column('NextReviewDate', [])]
FNextReviewDate: Nullable<TDate>;
property NextReviewDate: Nullable<TDate> read FNextReviewDate write FNextReviewDate;
{
"error": {
"code": "EnxDatabaseError",
"message": "NexusDB: <unnamed TnxQuery instance>: Query execution failed: \r\nType mismatch (nxtDate <> nxtDateTime) when comparing at line 3, pos 25 [ A.NextReviewDate > TIMESTAMP '2013-04-28 00:00:00.000']\r\n\r\n [$3CA0/15520]"
}
}
wlandgraf
(Wagner Landgraf)
April 29, 2023, 10:25pm
2
Currently TMS XData doesn't understand a date literal. The only literals supported in $filter
string is the complete one with date and time part.
Thus, when such value is "forwarded" to the underlying SQL-generation mechanism (Aurelius) it's set as a date/time value.
Thanks. Is it your intention to resolve this?
wlandgraf
(Wagner Landgraf)
May 3, 2023, 6:17pm
4
Yes, we can manage to support date-only and time-only literals.
Is this urgent for you? Is it ok for you if you file a feature request for this?
Thanks Wagner. Done. Yes, it is urgent for me as I have a VCL and Web Core app sharing the same database.
Regards,
Ken
1 Like
wlandgraf
(Wagner Landgraf)
May 4, 2023, 11:44am
6
Ok, thanks for adding the feature request .
We will try to implement this asap.
Thanks very much. I owe you a beer!
system
(system)
Closed
May 5, 2023, 12:39pm
8
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.