codeconsole opened a new pull request, #15111:
URL: https://github.com/apache/grails-core/pull/15111

   ```groovy
   class Person {
       LocalDateTime created
       Instant modified
   }
   ```
   
   results in inconsistent mongo storage. 
   ```
     {
       _id: '68e0824c605bbe8f074c52ba',
       created: ISODate('2025-10-04T02:11:24.201Z'),
       modified: Long('1759543884201'),
       version: Long('0')
     }
   ```
   
   Spring Data MongoDB persists Instant as a BSON DateTime (displayed as 
ISODate(...)), not as a raw long. That’s the correct and expected mapping.
   
   Aggregation stages or queries that expect date types:
   $year, $month, $week, $dayOfWeek
   $dateTrunc, $dateAdd, $dateSubtract
   $dateToString, $dateFromParts
   
   so none of this works with the current Instant > Long implementation 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to