Java 休眠蚂蚁工具

Java 休眠蚂蚁工具,java,hibernate,jakarta-ee,ant,Java,Hibernate,Jakarta Ee,Ant,我使用hibernate ant工具生成带有注释的hibernate pojo类。 使用ANT脚本从现有表生成POJO类的策略是什么 我找到了答案,现在就贴出来 If table column is having not null constraint, then a property related to that column in generated class will be of primitive type. If table column is not having not n

我使用hibernate ant工具生成带有注释的hibernate pojo类。 使用ANT脚本从现有表生成POJO类的策略是什么

我找到了答案,现在就贴出来

If table column is having not null constraint, 
then a property related to that column in generated class will be of primitive type.

If table column is not having not null constraint, 
then a property related to that column in generated class will be of java.lang.X type.
(X == any of Integer,Byte,Float,Double depends on table column type in database)

If table column is having primary key constraint, 
then a property related to that column in generated class will be of primitive type.

If table column is having primary key constraint and it is AUTO INCREAMENT OR foreign key,
then a property related to that column in generated class will be of java.lang.X type.
(X == any of Integer,Byte,Float,Double depends on table column type in database)