Description of problem: With "hibernate.hbm2ddl.auto=validate", if there are synonyms on DB tables, the validation fails. Sure, the schema validation could be disabled, but this validation gives a developer a better "security" feeling. Upstream Jira/Patch: https://hibernate.atlassian.net/browse/HHH-8183 Version-Release number of selected component (if applicable): All up to EAP 6.1.0 Alpha How reproducible: Always Steps to Reproduce: 1. use synonym on a table name 2. deploy an application with hbm2ddl = auto Actual results: Validation error. Expected results: Validation pass. Additional info: Pull requests: * for master : https://github.com/hibernate/hibernate-orm/pull/508 * for 3.3 branch : https://github.com/hibernate/hibernate-orm/pull/510
Adam, is this for a one-off, or just the permanent fix in 6.2.0?
Brett Meyer <brmeyer> made a comment on jira JBPAPP-10707 Attaching patched jar
Brad Maxwell <bmaxwell> made a comment on jira JBPAPP-10707 JBPAPP-10707-signed.tgz contains signed versions of the currently attached jars listed below. hibernate-core-3.3.2.GA_CP05.jar: - MD5 checksum before signing: 272837e01dcdd58b236f8c6b68057cc3 - MD5 checksum after signing: 8614eb219f0f73583d4f17a4a302861d
This one is for the permanent fix.
Brett Meyer <brmeyer> updated the status of jira JBPAPP-10709 to Resolved
Brett Meyer <brmeyer> made a comment on jira JBPAPP-10709 Committed to http://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3_2_GA_CP/
Fix pushed to: http://git.app.eng.bos.redhat.com/?p=hibernate/hibernate-core.git;a=shortlog;h=refs/heads/eap61-cp-updates
Adam Kovari <akovari> made a comment on jira JBPAPP-10709 This doesn't seem to work properly. The table validation succeeds - as it finds the table but it doesn't find any columns. For all columns it reports "Missing column": {code} Caused by: org.hibernate.HibernateException: Missing column: id in AKOVARI.TEST_SYN at org.hibernate.mapping.Table.validateColumns(Table.java:277) at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1131) at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:139) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:360) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1342) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:670) ... 56 more {code} I'll attach a simple reproducer.
Adam Kovari <akovari> updated the status of jira JBPAPP-10709 to Reopened
Adam Kovari <akovari> made a comment on jira JBPAPP-10709 Reopening as the column validation seems not to work.
Brett Meyer <brmeyer> made a comment on jira JBPAPP-10709 Oracle requires that the "includeSynonyms" property be set to "true" in your datasource. Following up with https://hibernate.atlassian.net/browse/HHH-8226.
Brett Meyer <brmeyer> made a comment on jira JBPAPP-10709 HHH-8226 committed to http://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3_2_GA_CP/
Additional fix was necessary: https://hibernate.atlassian.net/browse/HHH-8226 Pushed to http://git.app.eng.bos.redhat.com/?p=hibernate/hibernate-core.git;a=shortlog;h=refs/heads/eap61-cp-updates
Christopher O'Brien <cobrien> updated the status of jira JBPAPP-10707 to Resolved
Adam Kovari <akovari> updated the status of jira JBPAPP-10707 to Resolved
verified on EAP 6.2.0.ER1
Scott Mumford <smumford> updated the status of jira JBPAPP-10709 to Reopened
Scott Mumford <smumford> updated the status of jira JBPAPP-10709 to Closed