HHH-11573 - Added todo wrt query context.
This commit is contained in:
parent
938b481cd9
commit
8d7562a314
|
@ -37,6 +37,20 @@ public class EntityTypeAuditExpression implements AuditCriterion {
|
||||||
String baseAlias,
|
String baseAlias,
|
||||||
QueryBuilder qb,
|
QueryBuilder qb,
|
||||||
Parameters parameters) {
|
Parameters parameters) {
|
||||||
|
// todo: add contextual detail about query generation
|
||||||
|
//
|
||||||
|
// Take an example situation where a non-audited entity extends an audited-entity and uses the
|
||||||
|
// AuditEntity#entityType method with the non-audited entity. It would stand to reason that
|
||||||
|
// it makes sense that we'd throw a NotAuditedException here rather than apply the restriction
|
||||||
|
// anyway and return no results?
|
||||||
|
//
|
||||||
|
// Knowing whether EntityTypeAuditExpression is for an association traversal or part of the
|
||||||
|
// entity inheritance criteria of the root entity would drive how we'd either throw an
|
||||||
|
// exception or be lenient and permit adding the expression without validation.
|
||||||
|
//
|
||||||
|
// For now, we're just going to allow adding the criteria without any validation because the
|
||||||
|
// code needs to support both traversal paths without any clear distinction.
|
||||||
|
//
|
||||||
String effectiveAlias = alias == null ? baseAlias : alias;
|
String effectiveAlias = alias == null ? baseAlias : alias;
|
||||||
String effectiveEntityName = entityName;
|
String effectiveEntityName = entityName;
|
||||||
if ( enversService.getEntitiesConfigurations().isVersioned( effectiveEntityName ) ) {
|
if ( enversService.getEntitiesConfigurations().isVersioned( effectiveEntityName ) ) {
|
||||||
|
|
Loading…
Reference in New Issue