Package javax.persistence

Examples of javax.persistence.ManyToMany.mappedBy()


        currentAssociationEnd1.setMultiplicity(EdmMultiplicity.ONE);
        currentAssociationEnd2.setMultiplicity(EdmMultiplicity.ONE);
        if (annotatedElement != null) {
          OneToOne reln = annotatedElement.getAnnotation(OneToOne.class);
          if (reln != null) {
            mappedBy = reln.mappedBy();
          }
        }
        break;
      default:
        break;
View Full Code Here


          );
          //collectionBinder.setCascadeStrategy( getCascadeStrategy( embeddedCollectionAnn.cascade(), hibernateCascade ) );
          collectionBinder.setOneToMany( true );
        }
        else if ( manyToManyAnn != null ) {
          mappedBy = manyToManyAnn.mappedBy();
          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( manyToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
View Full Code Here

          );
          //collectionBinder.setCascadeStrategy( getCascadeStrategy( embeddedCollectionAnn.cascade(), hibernateCascade ) );
          collectionBinder.setOneToMany( true );
        }
        else if ( manyToManyAnn != null ) {
          mappedBy = manyToManyAnn.mappedBy();
          collectionBinder.setTargetEntity(
              mappings.getReflectionManager().toXClass( manyToManyAnn.targetEntity() )
          );
          collectionBinder.setCascadeStrategy(
              getCascadeStrategy(
View Full Code Here

    assertAnnotationNotPresent( JoinTable.class );
    assertAnnotationNotPresent( Access.class );
    ManyToMany relAnno = reader.getAnnotation( ManyToMany.class );
    assertEquals( 0, relAnno.cascade().length );
    assertEquals( FetchType.LAZY, relAnno.fetch() );
    assertEquals( "", relAnno.mappedBy() );
    assertEquals( void.class, relAnno.targetEntity() );
  }

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

    assertAnnotationNotPresent( JoinTable.class );
    assertAnnotationPresent( Access.class );
    ManyToMany relAnno = reader.getAnnotation( ManyToMany.class );
    assertEquals( 0, relAnno.cascade().length );
    assertEquals( FetchType.EAGER, relAnno.fetch() );
    assertEquals( "field2", relAnno.mappedBy() );
    assertEquals( Entity3.class, relAnno.targetEntity() );
    assertEquals(
        AccessType.PROPERTY, reader.getAnnotation( Access.class )
        .value()
    );
View Full Code Here

          rel.setName(methods[j].getName());

          rel.setFromMany(true);
          rel.setToMany(true);
          rel.setToBeanClassName(a.targetEntity().getCanonicalName());
          rel.setMappedBy(a.mappedBy());
        }

        if (annotations[k].annotationType().equals(javax.persistence.OneToOne.class))
        {
          OneToOne a = (OneToOne) annotations[k];
View Full Code Here

          rel.setName(methods[j].getName());

          rel.setFromMany(false);
          rel.setToMany(false);
          rel.setToBeanClassName(a.targetEntity().getCanonicalName());
          rel.setMappedBy(a.mappedBy());
        }

        /**
         * Annotazioni relative alla generazione !!!!
         *
 
View Full Code Here

          rel.setName(methods[j].getName());

          rel.setFromMany(true);
          rel.setToMany(true);
          rel.setToBeanClassName(a.targetEntity().getCanonicalName());
          rel.setMappedBy(a.mappedBy());
        }

        if (annotations[k].annotationType().equals(javax.persistence.OneToOne.class))
        {
          OneToOne a = (OneToOne) annotations[k];
View Full Code Here

          rel.setName(methods[j].getName());

          rel.setFromMany(false);
          rel.setToMany(false);
          rel.setToBeanClassName(a.targetEntity().getCanonicalName());
          rel.setMappedBy(a.mappedBy());
        }
      }

      if (rel != null)
        tmp.add(rel);
View Full Code Here

          rel.setName(methods[j].getName());

          rel.setFromMany(true);
          rel.setToMany(true);
          rel.setToBeanClassName(a.targetEntity().getCanonicalName());
          rel.setMappedBy(a.mappedBy());

          // tmp.add(rel);
        }

        if (annotations[k].annotationType().equals(javax.persistence.OneToOne.class))
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.