Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » can't add data
can't add data [message #73392] Thu, 01 March 2007 19:45
Paul Gardiner is currently offline Paul GardinerFriend
Messages: 94
Registered: July 2009
I'm trying to add some emf objects like in the tutorial step 3. I can
create the root object, but then when I try to add something to a list in
that object, it doesn't work. The Server object below returns an
EList<Plugin> object. When I add a Plugin object to the EList, it seems to
work, but then when I read it back again, nothing is there. I put in a
flush, and reopened the session to see what would happen, and even
re-queried, but no use. I must be doing something incorrectly. Any ideas?

public Server addPlugin(String serverID,Plugin plugin) throws
Session session=sessionFactory.openSession();
Query query=session.createQuery("FROM Server where id='"+serverID+"'");
Server server=(Server)query.list().get(0);
getLogger().info("initial plugin count:"+server.getPlugins().size());
query=session.createQuery("FROM Server where id='"+serverID+"'");
getLogger().info("new plugin count:"+server.getPlugins().size());
return server;


Output from the log statements shows count of zero.
Previous Topic:[Teneo] Save of resource takes VERY long time
Next Topic:can't add data
Goto Forum:

Current Time: Thu Oct 29 03:21:16 GMT 2020

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

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

Back to the top