摘要: many-to-many单向 Model Entity User.java public class User implements Serializable { private Integer userId; private String name; private Set<Role> roles = new HashSet<Role>(); // Dient ... 阅读全文
posted @ 2012-02-16 20:26 xianshibian 阅读(176) 评论(0) 推荐(0)
摘要: ModelEntitätUser.javapublic class User implements Serializable { private Integer userId; private String name; private Set<Role> roles = new HashSet<Role>(); // Dient dazu, dass Hibernate direkt Constructor.newInstance() aufrufen kann, um neu Objekt zu instanzieren. public User() { . 阅读全文
posted @ 2012-02-16 19:10 xianshibian 阅读(219) 评论(0) 推荐(0)
摘要: Quellecode 1 Connection conn = DBUtil.getConnection(); 2 conn.setAutoCommit(false); 3 Statement stmt = conn.createStatement(); 4 5 // Initialisierung der CLOB-Felder. sonst folgt NullPointerException 6 String initSql = "UPDATE ATTACHMENT SET MYCLOB=EMPTY_CLOB() WHERE ID=1"; 7 8 // Zugriff 阅读全文
posted @ 2012-02-01 18:37 xianshibian 阅读(154) 评论(0) 推荐(0)