Package org.hibernate.test.instrument.domain

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


*/
public class TestManyToOneProxyExecutable extends AbstractExecutable {
  public void execute() {
    Session s = getFactory().openSession();
    Transaction t = s.beginTransaction();
    Entity root = new Entity( "root" );
    Entity child1 = new Entity( "child1" );
    Entity child2 = new Entity( "child2" );
    root.setChild( child1 );
    child1.setSibling( child2 );
    Entity gChild1 = new Entity( "grandchild 1" );
    Entity gChild2 = new Entity( "grandchild 2" );
    child1.setChild( gChild1 );
    gChild1.setSibling( gChild2 );
    s.save( root );
    t.commit();
    s.close();
View Full Code Here


*/
public class TestManyToOneProxyExecutable extends AbstractExecutable {
  public void execute() {
    Session s = getFactory().openSession();
    Transaction t = s.beginTransaction();
    Entity root = new Entity( "root" );
    Entity child1 = new Entity( "child1" );
    Entity child2 = new Entity( "child2" );
    root.setChild( child1 );
    child1.setSibling( child2 );
    Entity gChild1 = new Entity( "grandchild 1" );
    Entity gChild2 = new Entity( "grandchild 2" );
    child1.setChild( gChild1 );
    gChild1.setSibling( gChild2 );
    s.save( root );
    t.commit();
    s.close();
View Full Code Here

TOP

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

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.