Examples of Backref


Examples of org.hibernate.mapping.Backref

      && !collection.isInverse()
      && !collection.getKey().isNullable() ) {
      // for non-inverse one-to-many, with a not-null fk, add a backref!
      String entityName = ( (OneToMany) collection.getElement() ).getReferencedEntityName();
      PersistentClass referenced = mappings.getClass( entityName );
      Backref prop = new Backref();
      prop.setName( '_' + collection.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "Backref" );
      prop.setUpdateable( false );
      prop.setSelectable( false );
      prop.setCollectionRole( collection.getRole() );
      prop.setEntityName( collection.getOwner().getEntityName() );
      prop.setValue( collection.getKey() );
      referenced.addProperty( prop );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.Backref

      && !collection.isInverse()
      && !collection.getKey().isNullable() ) {
      // for non-inverse one-to-many, with a not-null fk, add a backref!
      String entityName = ( (OneToMany) collection.getElement() ).getReferencedEntityName();
      PersistentClass referenced = mappings.getClass( entityName );
      Backref prop = new Backref();
      prop.setName( '_' + collection.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "Backref" );
      prop.setUpdateable( false );
      prop.setSelectable( false );
      prop.setCollectionRole( collection.getRole() );
      prop.setEntityName( collection.getOwner().getEntityName() );
      prop.setValue( collection.getKey() );
      referenced.addProperty( prop );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.Backref

      && !collection.isInverse()
      && !collection.getKey().isNullable() ) {
      // for non-inverse one-to-many, with a not-null fk, add a backref!
      String entityName = ( (OneToMany) collection.getElement() ).getReferencedEntityName();
      PersistentClass referenced = mappings.getClass( entityName );
      Backref prop = new Backref();
      prop.setName( '_' + collection.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "Backref" );
      prop.setUpdateable( false );
      prop.setSelectable( false );
      prop.setCollectionRole( collection.getRole() );
      prop.setEntityName( collection.getOwner().getEntityName() );
      prop.setValue( collection.getKey() );
      referenced.addProperty( prop );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.Backref

    if ( !collection.isInverse()
        && !collection.getKey().isNullable() ) {
      // for non-inverse one-to-many, with a not-null fk, add a backref!
      String entityName = oneToMany.getReferencedEntityName();
      PersistentClass referenced = mappings.getClass( entityName );
      Backref prop = new Backref();
      prop.setName( '_' + fkJoinColumns[0].getPropertyName() + "Backref" );
      prop.setUpdateable( false );
      prop.setSelectable( false );
      prop.setCollectionRole( collection.getRole() );
      prop.setEntityName( collection.getOwner().getEntityName() );
      prop.setValue( collection.getKey() );
      referenced.addProperty( prop );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.Backref

      && !collection.isInverse()
      && !collection.getKey().isNullable() ) {
      // for non-inverse one-to-many, with a not-null fk, add a backref!
      String entityName = ( (OneToMany) collection.getElement() ).getReferencedEntityName();
      PersistentClass referenced = mappings.getClass( entityName );
      Backref prop = new Backref();
      prop.setName( '_' + node.attributeValue( "name" ) + "Backref" );
      prop.setUpdateable( false );
      prop.setSelectable( false );
      prop.setCollectionRole( collection.getRole() );
      prop.setEntityName( collection.getOwner().getEntityName() );
      prop.setValue( collection.getKey() );
      referenced.addProperty( prop );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.Backref

      && !collection.isInverse()
      && !collection.getKey().isNullable() ) {
      // for non-inverse one-to-many, with a not-null fk, add a backref!
      String entityName = ( (OneToMany) collection.getElement() ).getReferencedEntityName();
      PersistentClass referenced = mappings.getClass( entityName );
      Backref prop = new Backref();
      prop.setName( '_' + collection.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "Backref" );
      prop.setUpdateable( false );
      prop.setSelectable( false );
      prop.setCollectionRole( collection.getRole() );
      prop.setEntityName( collection.getOwner().getEntityName() );
      prop.setValue( collection.getKey() );
      referenced.addProperty( prop );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.Backref

    if ( !collection.isInverse()
        && !collection.getKey().isNullable() ) {
      // for non-inverse one-to-many, with a not-null fk, add a backref!
      String entityName = oneToMany.getReferencedEntityName();
      PersistentClass referenced = mappings.getClass( entityName );
      Backref prop = new Backref();
      prop.setName( '_' + fkJoinColumns[0].getPropertyName() + '_' + fkJoinColumns[0].getLogicalColumnName() + "Backref" );
      prop.setUpdateable( false );
      prop.setSelectable( false );
      prop.setCollectionRole( collection.getRole() );
      prop.setEntityName( collection.getOwner().getEntityName() );
      prop.setValue( collection.getKey() );
      referenced.addProperty( prop );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.Backref

    if ( !collection.isInverse()
        && !collection.getKey().isNullable() ) {
      // for non-inverse one-to-many, with a not-null fk, add a backref!
      String entityName = oneToMany.getReferencedEntityName();
      PersistentClass referenced = mappings.getClass( entityName );
      Backref prop = new Backref();
      prop.setName( '_' + fkJoinColumns[0].getPropertyName() + "Backref" );
      prop.setUpdateable( false );
      prop.setSelectable( false );
      prop.setCollectionRole( collection.getRole() );
      prop.setEntityName( collection.getOwner().getEntityName() );
      prop.setValue( collection.getKey() );
      referenced.addProperty( prop );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.Backref

      && !collection.isInverse()
      && !collection.getKey().isNullable() ) {
      // for non-inverse one-to-many, with a not-null fk, add a backref!
      String entityName = ( (OneToMany) collection.getElement() ).getReferencedEntityName();
      PersistentClass referenced = mappings.getClass( entityName );
      Backref prop = new Backref();
      prop.setName( '_' + collection.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "Backref" );
      prop.setUpdateable( false );
      prop.setSelectable( false );
      prop.setCollectionRole( collection.getRole() );
      prop.setEntityName( collection.getOwner().getEntityName() );
      prop.setValue( collection.getKey() );
      referenced.addProperty( prop );
    }
  }
View Full Code Here

Examples of org.hibernate.mapping.Backref

    if ( !collection.isInverse()
        && !collection.getKey().isNullable() ) {
      // for non-inverse one-to-many, with a not-null fk, add a backref!
      String entityName = oneToMany.getReferencedEntityName();
      PersistentClass referenced = mappings.getClass( entityName );
      Backref prop = new Backref();
      prop.setName( '_' + fkJoinColumns[0].getPropertyName() + "Backref" );
      prop.setUpdateable( false );
      prop.setSelectable( false );
      prop.setCollectionRole( collection.getRole() );
      prop.setEntityName( collection.getOwner().getEntityName() );
      prop.setValue( collection.getKey() );
      referenced.addProperty( prop );
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.