[Teneo/Hibernate/GMF] DuplicateMappingException => QualifyingEntityNameStrategy => Ill [message #794446] |
Thu, 09 February 2012 04:47  |
Eclipse User |
|
|
|
Hello again,
i try to get teneo to work with gmf.
So i set the appropiate EPackages for the datastore.
final EPackage[] ePackages = new EPackage[] {
MyFirstPackage.eINSTANCE,
MySecondPackage.eINSTANCE,
NotationPackage.eINSTANCE, EcorePackage.eINSTANCE,
XMLTypePackage.eINSTANCE };
OneOfMyClasses is contained in both models in different implementation
(don't ask me why)
So i got these Exception:
Caused by: org.hibernate.DuplicateMappingException: Duplicate
class/entity mapping
OneOfMyClasses
I read that i should use a different naming strategy in this case:
datastore.getExtensionManager().registerExtension(
EntityNameStrategy.class.getName(),
QualifyingEntityNameStrategy.class.getName()
);
But now i get a new Exception:
java.lang.IllegalArgumentException: Illegal eClassStr for this resolver
(no dot separating the epackage nsprefix and name): AnyType_mixed
Maybe one of you has a clue what i should do now?
Greetings
Matthias
|
|
|
Re: [Teneo/Hibernate/GMF] DuplicateMappingException => QualifyingEntityNameStrategy => [message #794516 is a reply to message #794446] |
Thu, 09 February 2012 06:47  |
Eclipse User |
|
|
|
Hi Matthias,
Hmm, sounds like a bug, can you enter a bugzilla? In the meantime, you can go back to the previous namingstrategy and
annotate one of the OneOfMyClasses eclasses with an @Entity(name="MyUniquName") annotation.
http://wiki.eclipse.org/Teneo/Hibernate#Model_Relational_Mapping_with_EJB3.2FJPA_Annotations
gr. Martin
On 02/09/2012 10:47 AM, Matthias Kloppenborg wrote:
> Hello again,
>
> i try to get teneo to work with gmf.
> So i set the appropiate EPackages for the datastore.
>
> final EPackage[] ePackages = new EPackage[] {
> MyFirstPackage.eINSTANCE,
> MySecondPackage.eINSTANCE,
> NotationPackage.eINSTANCE, EcorePackage.eINSTANCE,
> XMLTypePackage.eINSTANCE };
>
>
> OneOfMyClasses is contained in both models in different implementation (don't ask me why)
>
> So i got these Exception:
>
> Caused by: org.hibernate.DuplicateMappingException: Duplicate
> class/entity mapping
> OneOfMyClasses
>
>
> I read that i should use a different naming strategy in this case:
>
> datastore.getExtensionManager().registerExtension(
> EntityNameStrategy.class.getName(),
> QualifyingEntityNameStrategy.class.getName()
> );
>
> But now i get a new Exception:
>
> java.lang.IllegalArgumentException: Illegal eClassStr for this resolver (no dot separating the epackage nsprefix and
> name): AnyType_mixed
>
> Maybe one of you has a clue what i should do now?
>
> Greetings
> Matthias
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.04743 seconds