Teneo: More than one class with same name [message #601730] |
Tue, 30 January 2007 06:19 |
Eclipse User |
|
|
|
Hi,
As I am having more than one ecore models, it is possible that classes
in different models can have the same name though in different packages.
By default, hibernate file generated by Teneo does not qualify entity
name with package, so that result in duplicate mapping error.
I tried to qualify entities with full package name then hibernate
complains that duplicate import and suggests:
try using auto-import="false"
So just wondering, where & how to specify this?
Though during initialization I specify some hibernate properties using
hbds.setHibernateProperties
and I don’t see this property in Environment class of hibernate.
Another issue is, if in case I don’t want to persist one of the entity
i.e. more than one class with same name in different packages), then I
comment out mapping for that class in hibernate file, but class still
exist in package and Teneo complains that more then one EClass with same
name:
java.lang.IllegalArgumentException: There is more than one EClass with
the same name (. . . . . A different EClassResolver should be used.
at
org.eclipse.emf.teneo.ecore.DefaultEClassNameStrategy.toECla ss(DefaultEClassNameStrategy.java:60)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.setRefersToOfSup ers(HbDataStore.java:812)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.setRefersToOfSup ers(HbDataStore.java:826)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.computeReferers( HbDataStore.java:800)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.initialize(HbDat aStore.java:163)
Any idea how to solve it?
Thanks.
- Parvez
|
|
|
Powered by
FUDForum. Page generated in 0.31661 seconds