Commit 4a21ba78 authored by Quxl's avatar Quxl

x

parent f0da7c0a
......@@ -68,14 +68,16 @@ public class MysqlTo {
List<String> paramyKeys = new ArrayList<String>();
while(set.next()) {
String columnName = set.getString("COLUMN_NAME").trim();
String columnType = set.getString("COLUMN_TYPE").trim();
String columnComment = set.getString("COLUMN_COMMENT");
String constraintName = set.getString("CONSTRAINT_NAME");
names.add(columnName);
types.add(columnType);
comments.add(columnComment);
if("PRIMARY".equals(constraintName)) {
paramyKeys.add(columnName);
if(!names.contains(columnName)) {
String columnType = set.getString("COLUMN_TYPE").trim();
String columnComment = set.getString("COLUMN_COMMENT");
String constraintName = set.getString("CONSTRAINT_NAME");
names.add(columnName);
types.add(columnType);
comments.add(columnComment);
if("PRIMARY".equals(constraintName)) {
paramyKeys.add(columnName);
}
}
}
ReverseUtil.parseEntity(pkg_name, author, root, name, comment, paramyKeys, names, types, comments);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment