Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Can't add data
[Teneo] Can't add data [message #603047] Thu, 01 March 2007 19:48
Paul Gardiner is currently offline Paul GardinerFriend
Messages: 94
Registered: July 2009
(oops -- forgot to put [Teneo] on subject)

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:can't add data
Next Topic:[Teneo] Possible to Override Generation of hibernate.hbm.xml?
Goto Forum:

Current Time: Mon May 17 01:38:12 GMT 2021

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

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

Back to the top