|
|
|
Re: [Texo] Does TexoResource support Element Collections? [message #938801 is a reply to message #938656] |
Wed, 10 October 2012 06:58 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Chris,
Ha now I understand, Texo does not know that Author is embedded so tries to explicitly insert it. Can you enter a
bugzilla for this? And attach your example project to it?
gr. Martin
On 10/10/2012 05:38 AM, Chris Boerger wrote:
> I've added to a simplified test case with a Book that has an Element Collection of Authors. Author being embeddable, generates the following code:
>
> @ElementCollection()
> @CollectionTable(joinColumns = { @JoinColumn(name = "BOOK_ID", referencedColumnName = "ID") }, name = "AUTHOR")
> @OneToMany(cascade = { CascadeType.ALL })
> private List<Author> authors = new ArrayList<Author>();
>
>
> I thought maybe the OneToMany interfered and removed it from the JPA annotation but it did not change the result:
>
> Object: Author [name: Hermann Melville] is not a known entity type.
> [EL Config]: Using OSGi initializer: [org.eclipse.persistence.internal.jpa.deployment.osgi.equinox.EquinoxInitializer].
> java.lang.IllegalArgumentException: Object: Author [name: Hermann Melville] is not a known entity type.
> at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4176)
> at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:451)
> at org.eclipse.emf.texo.server.store.BaseDao.insert(BaseDao.java:204)
> at org.eclipse.emf.texo.server.store.EntityManagerObjectStore.insert(EntityManagerObjectStore.java:108)
> at org.eclipse.emf.texo.server.store.EPersistenceService.persist(EPersistenceService.java:86)
> at org.eclipse.emf.texo.store.TexoResource.save(TexoResource.java:133)
>
>
> It may be a bug, but at this point I'm not experienced enough to say that I've not configured something improperly in the orm.annotationsmodel or ecore.
>
--
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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
Powered by
FUDForum. Page generated in 0.04101 seconds