clazz.appendChild(cid);
//cid.setAttribute("mapped","true");
Property prop;
// ids
for(int y=0;y<props.length;y++){
prop=props[y];
meta = prop.getDynamicAttributes();
Element key = doc.createElement("key-property");
cid.appendChild(key);
// name
key.setAttribute("name",prop.getName());
// column
Element column = doc.createElement("column");
key.appendChild(column);
String str = toString(cfc,prop,meta,"column",data);
if(Util.isEmpty(str,true)) str=prop.getName();
column.setAttribute("name",formatColumn(str,data));
ColumnInfo info=getColumnInfo(columnsInfo,tableName,str,null);
str = toString(cfc,prop,meta,"sqltype",data);
if(!Util.isEmpty(str,true)) column.setAttribute("sql-type",str);
str = toString(cfc,prop,meta,"length",data);
if(!Util.isEmpty(str,true)) column.setAttribute("length",str);
/*if(info!=null){
column.setAttribute("sql-type",info.getTypeName());
column.setAttribute("length",Caster.toString(info.getSize()));
}*/
// type
//str=getType(info,prop,meta,"long"); //MUSTMUST
//key.setAttribute("type", str);
String generator=toString(cfc,prop,meta,"generator",data);
String type = getType(info,cfc,prop,meta,getDefaultTypeForGenerator(generator,"string"),data);
if(!Util.isEmpty(type))key.setAttribute("type", type);
}
// many-to-one
String fieldType;
for(int y=0;y<props.length;y++){
prop=props[y];
meta = prop.getDynamicAttributes();
fieldType = toString(cfc,prop,meta,"fieldType",data);
if(CommonUtil.listFindNoCaseIgnoreEmpty(fieldType,"many-to-one",',')==-1)continue;
Element key = doc.createElement("key-many-to-one");
cid.appendChild(key);
// name
key.setAttribute("name",prop.getName());
// entity-name
setForeignEntityName(cfc,prop, meta, key,false,data);
// fkcolum