Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Check Existing Database Schema(Is there a way to check if an existing database schema matches the one Teneo would create for given entities?)
[Teneo] Check Existing Database Schema [message #1697326] Wed, 03 June 2015 07:59 Go to next message
Timo Rohrberg is currently offline Timo RohrbergFriend
Messages: 69
Registered: September 2011
Location: Karlsruhe
Member
Hello everybody,

does anyone (or Martin Wink) know if there is an easy way to check if existing database schema matches the one Eclipse Teneo would create for a given set of entities/packages?

Background: I would like to initialize my PostgreSQL database on my own and prevent Teneo from changing it on startup. Instead, I would like to prevent my persistence service to become available if the database schema does not match what Teneo would create if the database was empty.

Thanks a lot for any hints.

Regards
Timo
Re: [Teneo] Check Existing Database Schema [message #1697335 is a reply to message #1697326] Wed, 03 June 2015 09:06 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
Maybe this can help:

http://erdalkaracade.blogspot.de/2014/03/a-general-approach-to-migrating-emf.html

Timo Rohrberg wrote on Wed, 03 June 2015 09:59
Hello everybody,

does anyone (or Martin Wink) know if there is an easy way to check if existing database schema matches the one Eclipse Teneo would create for a given set of entities/packages?

Background: I would like to initialize my PostgreSQL database on my own and prevent Teneo from changing it on startup. Instead, I would like to prevent my persistence service to become available if the database schema does not match what Teneo would create if the database was empty.

Thanks a lot for any hints.

Regards
Timo

Re: [Teneo] Check Existing Database Schema [message #1697361 is a reply to message #1697335] Wed, 03 June 2015 12:29 Go to previous messageGo to next message
Timo Rohrberg is currently offline Timo RohrbergFriend
Messages: 69
Registered: September 2011
Location: Karlsruhe
Member
Hello Erdal,

wow - that's an interesting article discussing the whole migration problem which we are going to face in a couple of months as well Wink.

However, do you know how to generate the hibernate mapping for a specific revision with Teneo without actually changing the database. Is there a way to get the mapping that would be generated in the database by Teneo before it actually writes it into the database and prevent it from writing it to the database?

Thanks a lot.

Regards
Timo
Re: [Teneo] Check Existing Database Schema [message #1697375 is a reply to message #1697361] Wed, 03 June 2015 13:47 Go to previous message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
Yes, the nice aspect of that approach is that the hibernate mapping is generated at run time without creating a new database or modifying the productive database.
Unfortunately, I do not have the sources as the approach was implemented in a commercial application, but there is at least one unit test that shows how to generate the hibernate mapping at run time (and dump it for analysis).
Just have a look at the unit tests of teneo. I am sure Martin can help here.

Timo Rohrberg wrote on Wed, 03 June 2015 14:29
Hello Erdal,

wow - that's an interesting article discussing the whole migration problem which we are going to face in a couple of months as well Wink.

However, do you know how to generate the hibernate mapping for a specific revision with Teneo without actually changing the database. Is there a way to get the mapping that would be generated in the database by Teneo before it actually writes it into the database and prevent it from writing it to the database?

Thanks a lot.

Regards
Timo

Previous Topic:Ecore Diagram Editor shows empty "DAnalysis" node
Next Topic:[TEXO] Performance issue during Serializing Objects into XMI using Texo's ModelXMLSaver
Goto Forum:
  


Current Time: Sat Jun 06 05:56:20 GMT 2020

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

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

Back to the top