Search in sources :

Example 6 with SqlFieldMacro

use of org.nutz.dao.impl.entity.macro.SqlFieldMacro in project nutz by nutzam.

the class Sqlserver2005JdbcExpert method fetchPojoId.

public Pojo fetchPojoId(Entity<?> en, MappingField idField) {
    String autoSql = "SELECT @@@@IDENTITY as $field";
    Pojo autoInfo = new SqlFieldMacro(idField, autoSql);
    autoInfo.setEntity(en);
    return autoInfo;
}
Also used : Pojo(org.nutz.dao.sql.Pojo) SqlFieldMacro(org.nutz.dao.impl.entity.macro.SqlFieldMacro)

Aggregations

SqlFieldMacro (org.nutz.dao.impl.entity.macro.SqlFieldMacro)6 Pojo (org.nutz.dao.sql.Pojo)6