Examples of BelongsTo


Examples of com.et.ar.annotations.BelongsTo

                    field.setForeignKey(hasOne.foreignKey());
                }
               
                hasOneFields.add(field);
            }
            BelongsTo belongsTo = f.getAnnotation(BelongsTo.class);
            if (belongsTo != null){
                BelongsToField field = new BelongsToField();
                field.setName(f.getName());
                field.setAnnotation(belongsTo);
                field.setTargetType(f.getType());
                if (belongsTo.foreignKey().equals("")){
                    OrmInfo targetOrm = OrmInfo.getOrmInfo(f.getType());
                    field.setForeignKey(targetOrm.table+"_id");
                }
                else{
                    field.setForeignKey(belongsTo.foreignKey());
                }
                belongsToFields.add(field);
            }
        }
       
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.