It seems I need to have unique entitynames as well, because otherwise I get the following error message:
org.hibernate.AnnotationException: Use of the same entity name twice: Timage
This isn't strange at all since I have got two entities like this:
Code:
package crm;
@Entity
@Table(name = "timage", schema = "crm", uniqueConstraints = {})
public class Timage implements java.io.Serializable {
...
package etel;
@Entity
@Table(name = "timage", schema = "etel", uniqueConstraints = {})
public class Timage implements java.io.Serializable {
...
If I edit the java files manually to:
Code:
package crm;
@Entity(name="crm.Timage")
@Table(name = "timage", schema = "crm", uniqueConstraints = {})
public class Timage implements java.io.Serializable {
...
package etel;
@Entity(name="etel.Timage")
@Table(name = "timage", schema = "etel", uniqueConstraints = {})
public class Timage implements java.io.Serializable {
...
it works, but I would like to be able to reverse-enginer without any manual steps.
What I want is to have the Entities name like this @Entity(name="schemaname.tablename") instead of just @Entity which is the same as writeing @Entity(name="tablename")
I already have a reverse-engineering strategyfile that extends DelegatingReverseEngineeringStrategy so that the files use the sequences in postgres, but I can't see any method in DelegatingReverseEngineeringStrategy for changeing the entityname.
Thanks in advance for any help :)