hibernate 多对多关系详解(包括中间表,一对多字表)
2012-05-25 11:13:59 来源:WEB开发网核心提示: + theEvent.getDate());}}elseif (args[0].equals("addpersontoevent")) {//store eventLong eventId = mgr.createAndStoreEvent("My Event", new Da
+ theEvent.getDate());
}
}
elseif (args[0].equals("addpersontoevent")) {
//store event
Long eventId = mgr.createAndStoreEvent("My Event", new Date());
//store Person
Long personId = mgr.createAndStorePerson("Foo", "Bar");
mgr.addPersonToEvent(personId, eventId);
更多精彩
赞助商链接