[CDO/Teneo] EMF Specific Extra Columns in DDL [message #917557] |
Thu, 20 September 2012 03:40  |
Eclipse User |
|
|
|
Hi Everyone,
Environment: Teneo /Hibernate
When I use Teneo to store EObjects it is generating extra columns in database
(E_CONTAINER,E_CONTAINER_FEATURE_NAME,..) is there any way to avoid those?
or generate as a seperate table?
I want only columns specific to my ECORE model to be created in the DDL.
Thanks.
Appasamy
|
|
|
|
|
|
|
|
Re: [CDO/Teneo] EMF Specific Extra Columns in DDL [message #918253 is a reply to message #917929] |
Thu, 20 September 2012 18:05  |
Eclipse User |
|
|
|
Hi Christoph,
In this specific case the container column is not needed even if you do containment like this. Mainly because you model
the bidirectional side of the containment association explicitly in the model.
Containment in itself makes sense for certain structures like order and orderlines. But as you touch upon, for a xml
document it is important that everything is contained in something (except for the root), this is less relevant for data
persisted in databases. There is no overall containing root type necessary then.
gr. Martin
On 09/20/2012 05:15 PM, Christoph Keimel wrote:
> Hi Martin
>
> Thank you for the information.
>
> So if A is a child of B and has an opposite reference to B class B {
> contains A[] a opposite b
> }
> class A {
> container B[1] b opposite a
> }and I read A directly, the call to getB() would return null, since this internally uses the eContainer attribute. Correct?
>
> What if the reference from A to B is non-containment?
> class B {
> refers A[] a opposite b
> }
> class A {
> refers B[1] b opposite a
> }Would A.getB() lazy-load its reference to B in this situation?
>
> I ask, because I am currently thinking about whether to use containment references at all. I get the feeling that, when
> working with the database, the concept of containment vs. reference is unnecessarily complex. Opinions on this statement
> are very welcome :)
>
> Greetings
> Christoph
--
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.04585 seconds