Bug 952284
Summary: | Hibernate SchemaValidation on synonyms | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Adam Kovari <akovari> |
Component: | Hibernate | Assignee: | Brett Meyer <brmeyer> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | TBD EAP 6 | CC: | msimka, nobody, theute |
Target Milestone: | ER1 | ||
Target Release: | EAP 6.2.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: |
JBoss EAP 6 has been enhanced by providing the ability for Hibernate entities to be validated against table synonyms. Previously, the schema validation would only validate tables and views.
To enable this new functionality, the `hibernate.synonyms=true` property must be set.
For example, the following will now pass Hibernate schema validation:
----
"CREATE SYNONYM foo_synonym FOR foo_table"
@Table(name = "foo_synonym")
----
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2013-12-15 16:12:56 UTC | Type: | Enhancement |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 999686 |
Description
Adam Kovari
2013-04-15 14:50:21 UTC
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/ Brett Meyer <brmeyer> updated the status of jira JBPAPP-10709 to Resolved 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 |