Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF Databaseconnection Issue(hibernate/postgres/mindmapexample)
GMF Databaseconnection Issue [message #684427] Wed, 15 June 2011 14:54 Go to next message
Andreas  is currently offline Andreas Friend
Messages: 19
Registered: October 2009
Junior Member
Hi,

i want to store/load all GMF-diagram and modelcontent into a postgressql-database.

To learn how it could be done, i`m trying the hibernate/teneo/gmf-example (mindmap) with changes to use postgres-DB.

I´m able to store and load the node-element ("Topic"). At this point i`m able to close and reopen editor without failure.
When i connect two nodes with a connection-element ("Subtopic"), safe, close and reopen the editor, the editor remains "dirty".
Trying to safe in this state causes

"Save Failed
object references an unsaved transient instance - save the transient instance before flushing: Edge"

"org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations)"


I read a lot and tried a lot of different settings in hibernate.hbm.xml especially different cascade-settings but nothing works.

Maybe someone knows the answer.

With kind regards
Re: GMF Databaseconnection Issue [message #684450 is a reply to message #684427] Wed, 15 June 2011 15:31 Go to previous messageGo to next message
Joao S is currently offline Joao SFriend
Messages: 51
Registered: January 2011
Member
Hello,

I don´t really know the answer but I´m having the exactly same issue.

Somehow I think that this is a Reference Based Links specific issue.

When you do this:

Quote:
When i connect two nodes with a connection-element ("Subtopic"), safe, close and reopen the editor, the editor remains "dirty".
Trying to safe in this state causes


Are you able to delete the subtopic link?

Best Regards,
João
Re: GMF Databaseconnection Issue [message #684749 is a reply to message #684450] Thu, 16 June 2011 07:09 Go to previous messageGo to next message
Andreas  is currently offline Andreas Friend
Messages: 19
Registered: October 2009
Junior Member
Hello João,

>> Are you able to delete the subtopic link? <<

No, i`m not. It`s possible to delete the link from diagram but trying to save this causes the same error message/exception as described above.

I`m glad i`m not the only one with this issue Smile

with kind regards

Andreas
Re: GMF Databaseconnection Issue [message #686465 is a reply to message #684749] Wed, 22 June 2011 09:32 Go to previous message
Andreas  is currently offline Andreas Friend
Messages: 19
Registered: October 2009
Junior Member
I solved this issue.

that`s my way:
1. I stripped down the mindmap.ecore to the basic elements(see ecore file attatched)
2. I changed properties of the "target"-association (Relationship-Topic)
Derived == true
3. StoreController was changed from "localDataStore.setProperties(props);" to
"localDataStore.setDataStoreProperties(props);"


Honestly, i`m not sure what exactly solved the issue. My favourites are Point 1 and 2 Smile

with kind regards

Andreas
Previous Topic:Enabling drag-n-drop from palette
Next Topic:Add and Delete a Compartment Dynamically
Goto Forum:
  


Current Time: Fri Apr 19 01:49:13 GMT 2024

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

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

Back to the top