Package org.hibernate.test.instrument.domain

Examples of org.hibernate.test.instrument.domain.Folder


  public void execute() {
    Session s = getFactory().openSession();
    Transaction t = s.beginTransaction();
    Owner o = new Owner();
    Document doc = new Document();
    Folder fol = new Folder();
    o.setName("gavin");
    doc.setName("Hibernate in Action");
    doc.setSummary("blah");
    doc.updateText("blah blah");
    fol.setName("books");
    doc.setOwner(o);
    doc.setFolder(fol);
    fol.getDocuments().add(doc);
    s.persist(o);
    s.persist(fol);
    t.commit();
    s.close();
View Full Code Here


  public void execute() {
    Session s = getFactory().openSession();
    Transaction t = s.beginTransaction();
    Owner o = new Owner();
    Document doc = new Document();
    Folder fol = new Folder();
    o.setName("gavin");
    doc.setName("Hibernate in Action");
    doc.setSummary("blah");
    doc.updateText("blah blah");
    fol.setName("books");
    doc.setOwner(o);
    doc.setFolder(fol);
    fol.getDocuments().add(doc);
    Assert.assertTrue( Hibernate.isPropertyInitialized( doc, "summary" ) );
    s.persist(o);
    s.persist(fol);
    t.commit();
    s.close();
View Full Code Here

TOP

Related Classes of org.hibernate.test.instrument.domain.Folder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.