|
Re: [TEXO] Object Embeddable [message #856056 is a reply to message #854883] |
Wed, 25 April 2012 10:22 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Gabriele,
This is a bug, I entered a bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=377606
and pushed a fix for it, am doing a new build right now. Will answer here after I publish a new build.
Note that the EclipseLink orm supports different properties for Embedded and Embeddable, but for Texo these ones are
disabled for now (is more jpa compliant).
gr. Martin
On 04/24/2012 12:21 PM, gabriele Mising name wrote:
> Hello,
>
> I am using TEXO. I created a model (address-test.ecore) with 2 object: Customer and Address.
> I created a custom ORM annotated model (address-test-orm.annotationsmodel) :
> - Customer mapped as @Entity
> - Address mapped as @Embeddable (stereotype '@Entity' removed)
>
> I would like to obtain this result in generation:
>
>
> @Entity(name = "Customer")
> public class Customer {
> @Embedded private Address address = null;
> .....
> }
>
> @Embeddable()
> public class Address {
> @Basic(optional = true) private String city = null;
> @Basic(optional = true) private String street = null;
> .....
> }
>
>
> but, TEXO always generates two entity:
>
>
> @Entity(name = "Customer")
> public class Customer {
>
> @ManyToOne(cascade = { CascadeType.ALL }, optional = true, targetEntity = Address.class)
> @JoinColumns({ @JoinColumn() })
> private Address address = null;
> .....
> }
>
> @Entity(name = "Address ")
> @Embeddable()
> public class Address {
> @Basic(optional = true) private String city = null;
> @Basic(optional = true) private String street = null;
> .....
> }
>
>
> Can you help me?
>
>
>
>
--
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
|
|
|
Re: [TEXO] Object Embeddable [message #856430 is a reply to message #854883] |
Wed, 25 April 2012 16:45 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Gabriele,
I published a new build which should solve this issue.
gr. Martin
On 04/24/2012 12:21 PM, gabriele Mising name wrote:
> Hello,
>
> I am using TEXO. I created a model (address-test.ecore) with 2 object: Customer and Address.
> I created a custom ORM annotated model (address-test-orm.annotationsmodel) :
> - Customer mapped as @Entity
> - Address mapped as @Embeddable (stereotype '@Entity' removed)
>
> I would like to obtain this result in generation:
>
>
> @Entity(name = "Customer")
> public class Customer {
> @Embedded private Address address = null;
> .....
> }
>
> @Embeddable()
> public class Address {
> @Basic(optional = true) private String city = null;
> @Basic(optional = true) private String street = null;
> .....
> }
>
>
> but, TEXO always generates two entity:
>
>
> @Entity(name = "Customer")
> public class Customer {
>
> @ManyToOne(cascade = { CascadeType.ALL }, optional = true, targetEntity = Address.class)
> @JoinColumns({ @JoinColumn() })
> private Address address = null;
> .....
> }
>
> @Entity(name = "Address ")
> @Embeddable()
> public class Address {
> @Basic(optional = true) private String city = null;
> @Basic(optional = true) private String street = null;
> .....
> }
>
>
> Can you help me?
>
>
>
>
--
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.03052 seconds