miq opened a new issue, #14344:
URL: https://github.com/apache/grails-core/issues/14344
We are using Grails 5.2.5 annd GORM 7.3.2 with Hibernate5.
We have a domain object with a collection/list of other domain object and
would like to do something like:
Container.where {
parts.size() == 1
parts{ id == 123 }
}.deleteAll()
As per documentation (section 7.4.5) this is supported by both where-queries
and detached criteria:
http://gorm.grails.org/latest/hibernate/manual/index.html#whereQueries
Doing so leads to the exception:
Caused by: org.springframework.dao.InvalidDataAccessResourceUsageException:
Queries of type SizeEquals are not supported by this implementation
at
org.grails.datastore.mapping.query.jpa.JpaQueryBuilder.buildWhereClauseForCriterion(JpaQueryBuilder.java:906)
at
org.grails.datastore.mapping.query.jpa.JpaQueryBuilder.buildWhereClause(JpaQueryBuilder.java:859)
at
org.grails.datastore.mapping.query.jpa.JpaQueryBuilder.buildWhereClause(JpaQueryBuilder.java:847)
at
org.grails.datastore.mapping.query.jpa.JpaQueryBuilder.buildDelete(JpaQueryBuilder.java:143)
at
org.grails.orm.hibernate.HibernateSession.lambda$deleteAll$0(HibernateSession.java:96)
at
org.grails.orm.hibernate.GrailsHibernateTemplate.doExecute(GrailsHibernateTemplate.java:297)
at
org.grails.orm.hibernate.GrailsHibernateTemplate.execute(GrailsHibernateTemplate.java:241)
at
org.grails.orm.hibernate.HibernateSession.deleteAll(HibernateSession.java:92)
at
grails.gorm.DetachedCriteria$_deleteAll_closure6.doCall(DetachedCriteria.groovy:561)
--
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]