Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Question on teneo.mapping.join_table_for_non_contained_associations [Teneo]
Question on teneo.mapping.join_table_for_non_contained_associations [Teneo] [message #1027789] Wed, 27 March 2013 12:14 Go to next message
Josh A is currently offline Josh AFriend
Messages: 13
Registered: September 2012
Junior Member
Hi All,

As far as i understand, for a one to many non contained association, Teneo creates a Join table by default. I have verified that i can stop the join table creation by setting the property teneo.mapping.join_table_for_non_contained_associations to false.

But, before i opt for this, I am trying to understand whether i am missing something? Is there a reason why Teneo chose to represent one to many non-contained association via a Join table(rather than by just 2 primary tables)?

Thanks,
Josh
Re: Question on teneo.mapping.join_table_for_non_contained_associations [Teneo] [message #1027871 is a reply to message #1027789] Wed, 27 March 2013 14:34 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Josh,
The reason that I set this as the default is that it is the safest from a model --> rdb mapping perspective. It gives
the least possibility of name clashes when creating the database schema. With complex models with multiple inheritance
and with for example the oracle 30-character-limit join column names can accidentally clash. If someone tries Teneo for
the first time I don't want them to get stuck/disappointed on such a 'silly' thing as clashes in names.

A join table is less performance effective, but sometimes it is needed if an element can be present in a list multiple
times (unique==false).

The hibernate docs has a separate topic on collection mapping:
http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html_single/#performance-collections

See also this wiki page:
http://wiki.eclipse.org/Teneo/Hibernate/ModelRelational/Association_Mapping

gr. Martin

On 03/27/2013 01:14 PM, Josh A wrote:
> Hi All,
>
> As far as i understand, for a one to many non contained association, Teneo creates a Join table by default. I have
> verified that i can stop the join table creation by setting the property
> teneo.mapping.join_table_for_non_contained_associations to false.
>
> But, before i opt for this, I am trying to understand whether i am missing something? Is there a reason why Teneo chose
> to represent one to many non-contained association via a Join table(rather than by just 2 primary tables)?
> Thanks,
> Josh


--

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: Question on teneo.mapping.join_table_for_non_contained_associations [Teneo] [message #1027890 is a reply to message #1027871] Wed, 27 March 2013 14:55 Go to previous message
Josh A is currently offline Josh AFriend
Messages: 13
Registered: September 2012
Junior Member
Thanks for your quick reply. That answers my question. I found the Wiki link very helpful.

Thanks,
Josh
Previous Topic:Package: get EClass by name?
Next Topic:[CDO] PostgreSQL port is not taken into account when start CDO Server
Goto Forum:
  


Current Time: Thu Apr 25 16:35:33 GMT 2024

Powered by FUDForum. Page generated in 0.03399 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top