hibernate 多对多关系详解(包括中间表,一对多字表)
2012-05-25 11:13:59 来源:WEB开发网核心提示:System.out.println("Added person " + personId + " to event " + eventId);}elseif (args[0].equals("addemailtoperson")) {Long personI
System.out.println("Added person " + personId + " to event " + eventId);
}
elseif (args[0].equals("addemailtoperson")) {
Long personId = mgr.createAndStorePerson("Foozy", "Beary");
mgr.addEmailToPerson(personId, "foo@bar");
// mgr.addEmailToPerson(personId, "bar@foo");
System.out.println("Added two email addresses (value typed objects) to person entity : " + personId);
}
更多精彩
赞助商链接