Package org.nutz.dao.entity.annotation

Examples of org.nutz.dao.entity.annotation.Id.auto()


    Id id = field.getAnnotation(Id.class);
    if (null != id) {
      // Check
      if (!ef.getMirror().isIntLike())
        throw error(entity, "@Id field [%s] must be a Integer!", field.getName());
      if (id.auto()) {
        ef.setType(FieldType.SERIAL);
        // 如果是自增字段,并且没有声明 '@Next' ,为其增加 SELECT MAX(id) ...
        if (null == field.getAnnotation(Next.class)) {
          ef.setAfterInsert(FieldQuerys.create("SELECT MAX($field) FROM $view", ef));
        }
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.