I am trying to migrate my app running on hibernate 4.3 (wildfly) to 5.1.2 of wildfly 11.
One show stopper is that the "schema" parameter inside the @Table annotation does not seem to work anymore.
For example I have the following Entities:
Code:
@Entity
@Table(name = "ObjectA", schema = "schemaA")
public class A {
@JoinColumn(name = "schemaB_ID")
public B getPropertyType() {
return b;
}
}
@Entity
@Table(name = "ObjectB", schema = "schemaB")
public class B {
}
The two entities are in different schemas sitting on the same mysql server.
In persistence.xml my default entityManagerFactory is schemaA.
However when I use jpa query:
A fetch Join B, the application tries to find Table "ObjectB" on schemaA instead of trying to find it on SchemaB. So the @Table(name = "ObjectB", schema = "schemaB") is ignored?
The same query works fine in wildfly 8.2 with hibernate 4.3.
Not sure what I have to change in wildfly 11 with hibernate 5.1 and not sure what is breaking this, JPA? Hibernate? or Wildfly?