borinquenkid opened a new issue, #16806:
URL: https://github.com/apache/grails-core/issues/16806

   Split from monolithic audit #16674 (findings F17, F17d).
   
   ### Problem Description
   The Hibernate 7 domain binder currently ignores several standard Hibernate 
mapping annotations:
   
   1. **Ignored Mapping Annotations (F17)**:
      - `@Formula`: Property loaded as `null` instead of executing the formula 
expression.
      - `@SQLRestriction`: Restriction was dropped silently, causing queries to 
return rows that were intended to be filtered out.
      - `@FilterDef` / `@Filter`: Not mapped onto the entity metadata, 
preventing the session from enabling filters.
   2. **Subclass `@SQLRestriction` Guard (F17d)**:
      - Hibernate requires `@SQLRestriction` to be declared on the root entity 
hierarchy. When declared on a subclass, it was silently ignored. The binder 
should fail fast during metadata building with a descriptive configuration 
error directing the user to place the restriction on the root entity.
   
   ### Expected Behavior
   The Hibernate 7 domain binder should map `@Formula`, `@SQLRestriction`, and 
`@FilterDef`/`@Filter` on root entities and reject `@SQLRestriction` on 
subclasses at startup.


-- 
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]

  • [I] Hibernate 7: Support @Form... borinquenkid (via GitHub) via notifications

Reply via email to