column « Validation « JPA Q&A





1. Exception :: wrong column type when using :: validate    forum.hibernate.org

Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: childid, expected: int8 at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33) at com.onetoone.postgres.ChildContainsParent.Client.main(Client.java:15) Caused by: org.hibernate.HibernateException: Wrong column type: childid, expected: int8 at org.hibernate.mapping.Table.validateColumns(Table.java:261) at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1083) at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116) ...