Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo+Hibernate] TransientObjectException while saving a resourc
[Teneo+Hibernate] TransientObjectException while saving a resourc [message #604392] Thu, 05 April 2007 19:54
Markus Bischof is currently offline Markus BischofFriend
Messages: 72
Registered: July 2009
Member
This is a multi-part message in MIME format.

------=_NextPart_000_009B_01C777CC.ED1C3130
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi!

I have a problem saving a resource which was loaded from the filesystem =
as a XMIResourceImpl-Object in the database. I tried the following code =
for small models and it worked fine (There is probably a much better and =
simpler solution for this!)

hibernateResource.getContents().add(xmiResourceImplObject.ge tAllContents(=
).next());
hibResource.save(Collections.EMPTY_MAP);

(Assuming that a resource only contains one root-object).

But now I having trouble saving a bigger model. I get a =
HbMapperException which is caused by a TransientObjectException (at =
least eclipse tells me that) with the message:

"object references an unsaved transient instance - save the transient =
instance before flushing: ReferenceEdge"

So how can I save the "transient instance"?

Regards,
Markus Bischof
------=_NextPart_000_009B_01C777CC.ED1C3130
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D"">
<DIV><FONT face=3DArial size=3D2>Hi!<BR><BR>I have a problem saving a =
resource which=20
was loaded from the filesystem as a XMIResourceImpl-Object in the =
database. I=20
tried the following code for small models and it worked fine (There is =
probably=20
a much better and simpler solution for this!)</FONT></DIV><FONT =
face=3DArial=20
size=3D2>
<DIV><BR> hibernateResource.getContents().add(xmiResourceImplObject.ge tAll=
Contents().next());<BR>hibResource.save(Collections.EMPTY_MAP); </DIV>
<DIV>&nbsp;</DIV>
<DIV>(Assuming that a resource only contains one root-object).</DIV>
<DIV><BR>But now I having trouble saving a bigger model. I get a=20
HbMapperException which is caused by a TransientObjectException (at =
least=20
eclipse tells me that) with the message:</DIV>
<DIV><BR>"object references an unsaved transient instance - save the =
transient=20
instance before flushing: ReferenceEdge"<BR></DIV>
<DIV>So how can I save the "transient instance"?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards,</DIV>
<DIV>Markus Bischof</FONT></DIV></BODY></HTML>

------=_NextPart_000_009B_01C777CC.ED1C3130--
Previous Topic:[Teneo]Can't persist EStringToStringMapEntry instances
Next Topic:[Teneo] setting Hibernate Interceptor
Goto Forum:
  


Current Time: Tue Sep 24 17:11:03 GMT 2024

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

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

Back to the top