Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO/Hibernate] Exporting Hibernate Mapping
[CDO/Hibernate] Exporting Hibernate Mapping [message #953619] Mon, 22 October 2012 11:52 Go to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hello

I am currently playing with possible workflows to handle model evolution. I wanted to try something that Tom suggested in another post: Export the hibernate mapping and convert this to a DDL file which can be used to determine deltas to the schema.

I am having difficulties with step 1: Exporting the hibernate mapping.

I am trying to do this with the OSGi command "hibernate mapping <repo name> <file name>". The file itself is exported, but my teneo-properties (i.e. teneo.mapping.inheritance and teneo.mapping.persistence_xml) specified in cdo-server.xml are not used. So the file doesn't realy represent the current status.

Is there another way to export the hibernate mapping? Or is there a way to configure the OSGi command?

Greetings
Christoph


Re: [CDO/Hibernate] Exporting Hibernate Mapping [message #954060 is a reply to message #953619] Mon, 22 October 2012 19:08 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
I am not sure how the cdo repository properties should be added to the hibernate mapping file.

Though, that is an interesting approach to diff the hbm files and generate ddl to migrate the database to a newer model version.
I have found the following project which seems to be quite interesting and does the hbm diffs:

http://www.liquibase.org/manual/hibernate

Would be great if you would share your results!

Christoph Keimel wrote on Mon, 22 October 2012 07:52
Hello

I am currently playing with possible workflows to handle model evolution. I wanted to try something that Tom suggested in another post: Export the hibernate mapping and convert this to a DDL file which can be used to determine deltas to the schema.

I am having difficulties with step 1: Exporting the hibernate mapping.

I am trying to do this with the OSGi command "hibernate mapping <repo name> <file name>". The file itself is exported, but my teneo-properties (i.e. teneo.mapping.inheritance and teneo.mapping.persistence_xml) specified in cdo-server.xml are not used. So the file doesn't realy represent the current status.

Is there another way to export the hibernate mapping? Or is there a way to configure the OSGi command?

Greetings
Christoph



Re: [CDO/Hibernate] Exporting Hibernate Mapping [message #954168 is a reply to message #954060] Mon, 22 October 2012 20:58 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Christoph,
I entered a bugzilla and pushed a change for this a few minutes back:
http://git.eclipse.org/c/cdo/cdo.git/commit/?id=a65d08e000e88a26482e925623eec4c968c8a07c

Will be in the next 4.2 build.
http://www.eclipse.org/cdo/downloads/

Can you let me know if this solves your issue?

gr. Martin

On 10/22/2012 09:08 PM, Erdal Karaca wrote:
> I am not sure how the cdo repository properties should be added to the hibernate mapping file.
>
> Though, that is an interesting approach to diff the hbm files and generate ddl to migrate the database to a newer model
> version.
> I have found the following project which seems to be quite interesting and does the hbm diffs:
>
> http://www.liquibase.org/manual/hibernate
>
> Would be great if you would share your results!
>
> Christoph Keimel wrote on Mon, 22 October 2012 07:52
>> Hello
>>
>> I am currently playing with possible workflows to handle model evolution. I wanted to try something that Tom suggested
>> in another post: Export the hibernate mapping and convert this to a DDL file which can be used to determine deltas to
>> the schema.
>>
>> I am having difficulties with step 1: Exporting the hibernate mapping.
>> I am trying to do this with the OSGi command "hibernate mapping <repo name> <file name>". The file itself is exported,
>> but my teneo-properties (i.e. teneo.mapping.inheritance and teneo.mapping.persistence_xml) specified in cdo-server.xml
>> are not used. So the file doesn't realy represent the current status.
>>
>> Is there another way to export the hibernate mapping? Or is there a way to configure the OSGi command?
>>
>> 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
Re: [CDO/Hibernate] Exporting Hibernate Mapping [message #955263 is a reply to message #954168] Tue, 23 October 2012 16:55 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
@Martin: Thanks for the quick support! Your fix resolves the issue. Could you please merge this into the 4.1 maintenance stream? (I did a cherry-pick of the commit and it worked fine.)

@Erdal: Thanks for the tip Smile. I'll look into it.
Re: [CDO/Hibernate] Exporting Hibernate Mapping [message #956011 is a reply to message #955263] Wed, 24 October 2012 06:57 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Merged in 4.1:
http://git.eclipse.org/c/cdo/cdo.git/commit/?h=streams/4.1-maintenance&id=49f6c3db77d0c683d963f3786ebd85a13ecaab98

gr. Martin

On 10/23/2012 06:55 PM, Christoph Keimel wrote:
> @Martin: Thanks for the quick support! Your fix resolves the issue. Could you please merge this into the 4.1 maintenance
> stream? (I did a cherry-pick of the commit and it worked fine.)
>
> @Erdal: Thanks for the tip :). I'll look into it.


--

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
Previous Topic:Customize XML serialization with EMF
Next Topic:[Xcore] Ecore Diagram problem
Goto Forum:
  


Current Time: Thu Mar 28 21:45:04 GMT 2024

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

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

Back to the top