WEB开发网
开发学院软件开发Java hibernate 多对多关系详解(包括中间表,一对多字表... 阅读

hibernate 多对多关系详解(包括中间表,一对多字表)

 2012-05-25 11:13:59 来源:WEB开发网   
核心提示:.uniqueResult(); // Eager fetch the colleciton so we can use it detached System.out.println("session.getTransaction().commit();");session.getTransact
        .uniqueResult(); // Eager fetch the colleciton so we can use it detached

    

 

    System.out.println("session.getTransaction().commit();");

    session.getTransaction().commit();

 

    // End of first unit of work

 

    aPerson.getEvents().add(anEvent); // aPerson is detached

    // or bidirectional safety method, setting both sides: aPerson.addToEvent(anEvent);

 

    // Begin second unit of work

 

    Session session2 = HibernateUtil.

上一页  19 20 21 22 23 24 25 26  下一页

Tags:hibernate 关系 详解

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接