Package com.avaje.ebean.config

Examples of com.avaje.ebean.config.NamingConvention


    if (!prop.getTableJoin().hasJoinColumns() && beanTable != null){

      // use naming convention to define join (based on the bean name for this side of relationship)     
      // A unidirectional OneToMany or OneToMany with no mappedBy property
       
            NamingConvention nc = factory.getNamingConvention();

            String fkeyPrefix = null;
            if (nc.isUseForeignKeyPrefix()){
                fkeyPrefix = nc.getColumnFromProperty(descriptor.getBeanType(), descriptor.getName());
            }
        
      // Use the owning bean table to define the join
      BeanTable owningBeanTable = factory.getBeanTable(descriptor.getBeanType());
      owningBeanTable.createJoinColumn(fkeyPrefix, prop.getTableJoin(), false);
View Full Code Here


                // from the mapped by property.
                // Refer BeanDescriptorManager.readEntityRelationships()

            } else {
                // use naming convention to define join.
                NamingConvention nc = factory.getNamingConvention();
               
                String fkeyPrefix = null;
                if (nc.isUseForeignKeyPrefix()){
                    fkeyPrefix = nc.getColumnFromProperty(beanType, prop.getName());
                }

                beanTable.createJoinColumn(fkeyPrefix, prop.getTableJoin(), true);
            }
        }
View Full Code Here

TOP

Related Classes of com.avaje.ebean.config.NamingConvention

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.