Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] update
[CDO] update [message #1277776] Wed, 26 March 2014 13:00 Go to next message
Areq Novak is currently offline Areq NovakFriend
Messages: 12
Registered: March 2014
Junior Member
String query = "select * from e_art where cdo_id = '" + artId + "'";
CDOQuery cdq = cdoManager.createQuery(query);
Art art = cdq.getResultValue();
System.out.println("### "+ art);
//it work fine, art contain necessary data


StandaloneCDOAccessor standaloneCDOAccessor = new StandaloneCDOAccessor();
CDOSession cdoSession = standaloneCDOAccessor.openSession();
CDOTransaction transaction = cdoSession.openTransaction();
CDOQuery cdoq = transaction.createQuery("sql",
"select * from e_artrel where cdo_id = '" + uid
+ "'");
ArtRel artRel = cdoq.getResultValue(ArtRel.class);
artRel.setSource(art);

try {
transaction.commit();
} catch (CommitException e) {
e.printStackTrace();
}

//after commit in column source I have id (-X) (instead correct art id) - for non object (String, int) this update query works ok...

Do you have any idea how to improve this situation ?
Re: [CDO] update [message #1277789 is a reply to message #1277776] Wed, 26 March 2014 13:20 Go to previous message
Areq Novak is currently offline Areq NovakFriend
Messages: 12
Registered: March 2014
Junior Member
resolved - one transaction necessary Wink
Previous Topic:[CDO] Random access of long, flat lists of large data
Next Topic:EMF official maven repository?
Goto Forum:
  


Current Time: Fri Apr 26 16:20:38 GMT 2024

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

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

Back to the top