Package javax.persistence

Examples of javax.persistence.JoinTable.inverseJoinColumns()


    JoinTable joinTableAnno = reader.getAnnotation( JoinTable.class );
    assertEquals( "", joinTableAnno.catalog() );
    assertEquals( "", joinTableAnno.name() );
    assertEquals( "", joinTableAnno.schema() );
    assertEquals( 0, joinTableAnno.joinColumns().length );
    assertEquals( 0, joinTableAnno.inverseJoinColumns().length );
    assertEquals( 0, joinTableAnno.uniqueConstraints().length );
  }

  public void testJoinTableAllChildren() throws Exception {
    reader = getReader( Entity1.class, "field1", "many-to-one.orm5.xml" );
View Full Code Here


    assertFalse( joinColumns[1].updatable() );
    assertFalse( joinColumns[1].nullable() );
    assertTrue( joinColumns[1].unique() );

    // InverseJoinColumns
    JoinColumn[] inverseJoinColumns = joinTableAnno.inverseJoinColumns();
    assertEquals( 2, inverseJoinColumns.length );
    assertEquals( "", inverseJoinColumns[0].name() );
    assertEquals( "", inverseJoinColumns[0].referencedColumnName() );
    assertEquals( "", inverseJoinColumns[0].table() );
    assertEquals( "", inverseJoinColumns[0].columnDefinition() );
View Full Code Here

    assertFalse( joinColumns[1].updatable() );
    assertFalse( joinColumns[1].nullable() );
    assertTrue( joinColumns[1].unique() );

    //InverseJoinColumns
    JoinColumn[] inverseJoinColumns = joinTableAnno.inverseJoinColumns();
    assertEquals( 2, inverseJoinColumns.length );
    assertEquals( "", inverseJoinColumns[0].name() );
    assertEquals( "", inverseJoinColumns[0].referencedColumnName() );
    assertEquals( "", inverseJoinColumns[0].table() );
    assertEquals( "", inverseJoinColumns[0].columnDefinition() );
View Full Code Here

    JoinTable joinTableAnno = reader.getAnnotation( JoinTable.class );
    assertEquals( "", joinTableAnno.catalog() );
    assertEquals( "", joinTableAnno.name() );
    assertEquals( "", joinTableAnno.schema() );
    assertEquals( 0, joinTableAnno.joinColumns().length );
    assertEquals( 0, joinTableAnno.inverseJoinColumns().length );
    assertEquals( 0, joinTableAnno.uniqueConstraints().length );
  }

  public void testJoinTableAllChildren() throws Exception {
    reader = getReader( Entity1.class, "field1", "one-to-one.orm7.xml" );
View Full Code Here

    assertFalse( joinColumns[1].updatable() );
    assertFalse( joinColumns[1].nullable() );
    assertTrue( joinColumns[1].unique() );

    // InverseJoinColumns
    JoinColumn[] inverseJoinColumns = joinTableAnno.inverseJoinColumns();
    assertEquals( 2, inverseJoinColumns.length );
    assertEquals( "", inverseJoinColumns[0].name() );
    assertEquals( "", inverseJoinColumns[0].referencedColumnName() );
    assertEquals( "", inverseJoinColumns[0].table() );
    assertEquals( "", inverseJoinColumns[0].columnDefinition() );
View Full Code Here

    JoinTable joinTableAnno = reader.getAnnotation( JoinTable.class );
    assertEquals( "", joinTableAnno.catalog() );
    assertEquals( "", joinTableAnno.name() );
    assertEquals( "", joinTableAnno.schema() );
    assertEquals( 0, joinTableAnno.joinColumns().length );
    assertEquals( 0, joinTableAnno.inverseJoinColumns().length );
    assertEquals( 0, joinTableAnno.uniqueConstraints().length );
  }

  public void testJoinTableAllChildren() throws Exception {
    reader = getReader( Entity2.class, "field1", "one-to-many.orm17.xml" );
View Full Code Here

    assertFalse( joinColumns[1].updatable() );
    assertFalse( joinColumns[1].nullable() );
    assertTrue( joinColumns[1].unique() );

    // InverseJoinColumns
    JoinColumn[] inverseJoinColumns = joinTableAnno.inverseJoinColumns();
    assertEquals( 2, inverseJoinColumns.length );
    assertEquals( "", inverseJoinColumns[0].name() );
    assertEquals( "", inverseJoinColumns[0].referencedColumnName() );
    assertEquals( "", inverseJoinColumns[0].table() );
    assertEquals( "", inverseJoinColumns[0].columnDefinition() );
View Full Code Here

    JoinTable joinTableAnno = reader.getAnnotation( JoinTable.class );
    assertEquals( "", joinTableAnno.catalog() );
    assertEquals( "", joinTableAnno.name() );
    assertEquals( "", joinTableAnno.schema() );
    assertEquals( 0, joinTableAnno.joinColumns().length );
    assertEquals( 0, joinTableAnno.inverseJoinColumns().length );
    assertEquals( 0, joinTableAnno.uniqueConstraints().length );
  }

  public void testJoinTableAllChildren() throws Exception {
    reader = getReader( Entity2.class, "field1", "many-to-many.orm17.xml" );
View Full Code Here

    assertFalse( joinColumns[1].updatable() );
    assertFalse( joinColumns[1].nullable() );
    assertTrue( joinColumns[1].unique() );

    // InverseJoinColumns
    JoinColumn[] inverseJoinColumns = joinTableAnno.inverseJoinColumns();
    assertEquals( 2, inverseJoinColumns.length );
    assertEquals( "", inverseJoinColumns[0].name() );
    assertEquals( "", inverseJoinColumns[0].referencedColumnName() );
    assertEquals( "", inverseJoinColumns[0].table() );
    assertEquals( "", inverseJoinColumns[0].columnDefinition() );
View Full Code Here

        catalog = assocTable.catalog();
        schema = assocTable.schema();
        tableName = assocTable.name();
        uniqueConstraints = assocTable.uniqueConstraints();
        joins = assocTable.joinColumns();
        inverseJoins = assocTable.inverseJoinColumns();
      }

      collectionBinder.setExplicitAssociationTable( true );

      if ( !BinderHelper.isEmptyAnnotationValue( schema ) ) {
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.