Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by sascharitter
, 1 year ago
Target of [unique] constraints [composite.id.unique.UniqueWithCompositeId : (unsaved)] is not a domain instance. Unique constraint can only be applied to domain classes and not custom user types or embedded instances
org.grails.core.exceptions.GrailsRuntimeException: Target of [unique] constraints [composite.id.unique.UniqueWithCompositeId : (unsaved)] is not a domain instance. Unique constraint can only be applied to domain classes and not custom user types or embedded instances	at org.grails.orm.hibernate.validation.UniqueConstraint.processValidate(UniqueConstraint.java:142)	at grails.validation.AbstractConstraint.validate(AbstractConstraint.java:107)	at grails.validation.ConstrainedProperty.validate(ConstrainedProperty.java:979)	at org.grails.validation.GrailsDomainClassValidator.validatePropertyWithConstraint(GrailsDomainClassValidator.java:211)	at org.grails.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:81)	at org.grails.orm.hibernate.AbstractHibernateGormInstanceApi.save(AbstractHibernateGormInstanceApi.groovy:122)	at org.grails.datastore.gorm.GormEntity$Trait$Helper.save(GormEntity.groovy:151)