Package com.avaje.ebeaninternal.api

Examples of com.avaje.ebeaninternal.api.DerivedRelationshipData


      // this is the scenario for a derived foreign key
      // which will require an additional update
      // register for post insert of assocBean
      // update of bean set ... importedId.getLogicalName();
      // value of assocBean.getId
      DerivedRelationshipData d = new DerivedRelationshipData(assocBean, assocOne.getName(), bean);
      request.registerDerivedRelationship(d);
    }
  }
View Full Code Here


    if (derivedRelationships != null) {

      SpiEbeanServer ebeanServer = (SpiEbeanServer)persistRequest.getEbeanServer();

      for (int i = 0; i < derivedRelationships.size(); i++) {
        DerivedRelationshipData derivedRelationshipData = derivedRelationships.get(i);

        BeanDescriptor<?> beanDescriptor = ebeanServer.getBeanDescriptor(derivedRelationshipData.getBean().getClass());
       
        BeanProperty prop = beanDescriptor.getBeanProperty(derivedRelationshipData.getLogicalName());
        EntityBean entityBean = (EntityBean)derivedRelationshipData.getBean();
        entityBean._ebean_getIntercept().markPropertyAsChanged(prop.getPropertyIndex());
       
        ebeanServer.update(entityBean, transaction);       
      }
    }
View Full Code Here

TOP

Related Classes of com.avaje.ebeaninternal.api.DerivedRelationshipData

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.