Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Teneo Release Update (0.8.0) - please read for backward compatibility
Teneo Release Update (0.8.0) - please read for backward compatibility [message #89573] Thu, 12 July 2007 20:42
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
This Teneo release incorporates several larger changes.
-> A main change is that Teneo now has an ExtensionPoint/Manager mechanism. This makes it possible
to replace many parts of the mapping and annotation logic with your own custom implementation. (see
-> All sql naming related logic (table, join column, fk names) has been moved to one central
strategy class. This naming strategy class can be replaced by custom logic through the
ExtensionManager mechanism.
-> The entity naming has been implemented in a separate class which can be replaced through the
ExtensionManager mechanism.
-> Many classes have been moved to other (more logical) packages. The DefaultAnnotator class has
disappeared and is re-implemented in the AnnotationGenerator and several other smaller classes
(which are replaceable by custom implementations).
-> Default mapping behavior has changed. For Hibernate backward compatibility can be achieved by
setting specific options (see below).
-> New options have been added (see below).
-> About 25 bugzilla's are solved
-> Upgraded to the jpox 1.1.8 and hibernate 3.2.4 releases.

>>> Backward Compatibility

> Hibernate:
The default Teneo logic will now create a mapping which differs from previous releases, the
difference is in naming of join columns and tables. To generate backward compatible mappings the
following options have to be set explcitly:
- JOIN_TABLE_NAME_STRATEGY to ejb3 (new default value is unique)
- SET_DEFAULT_CASCADE_ON_NON_CONTAINMENT to true (see 'Different Cascade....' below).

The join table name of the join table for an eattribute with many=true (a list of primitive types)
is now computed by Teneo. This name is different than what hibernate creates because Teneo tries to
create unique names. This means that the new table name is not backward compatible with the old
name. To force the old table name you need to set a JoinTable annotation on the eattribute.

Teneo now uses a InitializeCollectionEventListener, if you also use this event listener then you
have to merge your code with this one.

Teneo will now also map volatile attributes. Please post a message on the newsgroup if this is a
problem for backward compatibility.

This release is not completely backward compatible for JPOX: the jdo file created by Teneo in this
release will be different compared to the previous release. The main difference is that Teneo now
generates the name of join tables and join columns. Before this was done by jpox. This release
should work with jdo files created by previous releases.

>>> Different Cascade setting on non-containment associations
The setting of cascade options on otm, mto and mtm has changed. As a default now no cascade is set
on these relations. This approach is better from a performance perspective and this behavior will be
the best default for most models. However it has a large influence on the way an object tree is
saved. Before you could save an object and then automatically also the objects refered to through a
single ereference or bi-directional elist were also saved/updated automatically. Without cascade
(the new default behavior) this does not happen anymore. The refered-to objects need to be saved
explicitly. This behavior is controlled through an option:
PersistenceOptions.SET_DEFAULT_CASCADE_ON_NON_CONTAINMENT (default is false)
By setting this option to true you will get the previous behavior. Note that in case of containment
always the full cascade options are set.

>>> ExtensionPoint/Manager mechanism
The mapping/annotation logic of Teneo is implemented in several different classes. The
ExtensionPoint/Manager mechanism of this release makes it possible to replace these classes with
custom implementations. In future release the extension mechanism will be made osgi compliant.
See here:

The extension mechanism is new and as always I am interested in feedback.

>>> New Mapping Options
The following new options have been added:

The option teneo.mapping.join_column_naming_strategy has been renamed to


>>> Deprecated annotation sources have been removed
These deprecated annotation sources have been removed:

>>> Changes in source code and location of Classes
- DefaultAnnotator and HibernateDefaultAnnotator have been removed and replaced by
AnnotationGenerator and many smaller classes. These classes are replaceable through the
ExtensionManager mechnism.
- The EClassNameStrategy classes have moved to a new package:
org.eclipse.emf.teneo.annotations.strategy in the org.eclipse.emf.teneo plugin.
- Code has moved from the org.eclipse.emf.teneo.annotations plugin to the org.eclipse.emf.teneo
plugin. This was required to solve cyclical dependencies. The org.eclipse.emf.teneo plugin now also
has a package org.eclipse.emf.teneo.annotations. The org.eclipse.emf.teneo.annotations plugin now
only contains the annotation model.
- HbContext.createInterceptor interface has changed slightly
- Classes have moved from org.eclipse.emf.teneo.hibernate.hbannotation.util to


With Regards, Martin Taal

Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: -
Web: -


With Regards, Martin Taal

Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: -
Web: -
Previous Topic:[ Teneo ] Comments as annotations?
Next Topic:Teneo Release Update (0.8.0) - please read for backward compatibility
Goto Forum:

Current Time: Sat Aug 13 04:34:34 GMT 2022

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

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

Back to the top