Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] legacy database and hibernate mappings
[Teneo] legacy database and hibernate mappings [message #620793] Fri, 10 April 2009 14:37
No real name is currently offline No real nameFriend
Messages: 113
Registered: July 2009
Senior Member
EMF+Teneo+Hibernate+Spring+RCP

I would like to use Teneo for hibernate access to legacy database. The
relationships between tables is not 100% well-defined. In some places
the relationships exist, in others they must be enforced through the
application. Over time, some fields may be added to the tables and some
tables may be added but that is under a separate change management cycle
not solely controlled by our group.

I would like to use Teneo so that we can adapt to database changes that
we and other groups ask for as well as allow other groups to extend our
ecore models and more easily update our application to suit their needs.
Essentially they might extend the database and respectively extend the
model. I realize that I can model and generate schema updates in forward
modeling but that change cycle is not always allowed for the application
groups.


Questions on some best practices to help with this:

a) How do I indicate hibernate options for the table name and columns
directly in the ecore model? Object names and table names do not match
nor do we want them to (the legacy names are very unfriendly)? We also
need to add sql queries and other tricks to get relationships to work in
the objects. We only have an ecore model. Typically we model through the
ecore diagram tool. There is no XSD or annotated java classes to
derive from. I have used teneo to generate an hbm file but I don't think
that this is the right place to put the hibernate options and it does
not appear to be a good idea to place the annotations on the generated
classes either. What's the best practice for this? Are their teneo
properties that replace hibernate properties that I should use instead?

b) If someone writes a new method in our domain object and we want to
automatically bring that operation back into our ecore, how do we do
that (merge java domain objects bakc into ecore)? This is not strictly a
teneo question.

c) Some objects that we want in our application do not map to a single
table in the legacy database but to 3-4 tables that must be joined. How
do I indicate this for teneo? This question is related to (1).

I've read through the teneo wiki but am not sure I saw obvious answers
to these questions.
Previous Topic:[EWM] Adding logging to the EMF workflow model
Next Topic:[Teneo] legacy database and hibernate mappings
Goto Forum:
  


Current Time: Fri Apr 26 11:34:05 GMT 2024

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

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

Back to the top