nhibernate-core icon indicating copy to clipboard operation
nhibernate-core copied to clipboard

DateOnly and TimeOnly support

Open gliljas opened this issue 1 month ago • 0 comments

Supporting DateOnly and TimeOnly. #2912

I have have working implementations of types that can store the values as int (20251028, 163215), but that may be something that should reside elsewhere.

I would very much like to support projecting properties like "Hour" and "Minute", even though a "ticks" based type is used. I had an implementation where the type itself could implement IHqlGeneratorForProperty, and the DateTimePropertiesHqlGenerator checked for this before going the default route. It worked well, but...

  1. Extracting the mapped type from the member expression is cumbersome.
  2. It would be nice to be able to support this in plain HQL as well. Not just LINQ.

gliljas avatar Oct 28 '25 15:10 gliljas