Does GORM 6.1.8.RELEASE
for Hibernate require any changes to domain classes?
Is joinTable
in the domain mapping a recent addition to GORM
?
I copied my domain classes from a working Grails 2.5.1 project to a Grails 3.2 project. When I launch the skeleton app with "dbCreate: 'validate'"
I get the following error:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'methodValidationPostProcessor' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Unsatisfied dependency expressed through method 'methodValidationPostProcessor' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateDatastoreServiceRegistry': Cannot resolve reference to bean 'hibernateDatastore' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateDatastore': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.grails.orm.hibernate.HibernateDatastore]: Constructor threw exception; nested exception is org.hibernate.MappingException: Foreign key (FK56o1sv2813gshwyyok919a6gp:library_document_attachments [])) must have same number of columns as the referenced primary key (library_document [id])
I don't have a composite key or any custom mapping in the association.
class LibraryDocument extends Trackable {
// Attributes
...
// Relationships
Attachment latestVersion
static belongsTo = [...]
SortedSet attachments
static hasMany = [attachments: Attachment]
...
}
Project Version information:
grailsVersion=3.3.2
gormVersion=6.1.8.RELEASE
gradleWrapperVersion=3.5