Hello,
I am testing Visual Paradigm to create ORM. The tools generates the code and sample code. An error appears when running the generated sample code: It is adding some characters to a table on the query:
22:56:02,363 ERROR JDBCExceptionReporter:101 - Unknown column ‘mncat1_.Idpk’ in ‘where clause’
The real table is called mncat, not mncat1_
Here is the scenario.
I have two Entities:
MnCat
Idpk: int(10)
Desc: varchar(255)
Mng
Id: int(10)
MnCat_Idpk: int(10) // foreign key to MnCat
Desc: varchar(255)
The tool generates the DB and the java code with some sample:
…
System.out.println(“Listing Mng by Criteria…”);
application.core.MngCriteria mngCriteria = new application.core.MngCriteria();
// Please uncomment the follow line and fill in parameter(s)
mngCriteria.idpk.eq(886448);
application.core.MnCatCriteria mngCriteriaMnCat = mngCriteria.createMngCategoryCriteria();
mngCriteriaMnCat.idpk.eq(3);
mngCriteria.setMaxResults(ROW_COUNT);
application.core.Mng[] applicationcoreMngs = mngCriteria.listMng();
length =applicationcoreMngs== null ? 0 : Math.min(applicationcoreMngs.length, ROW_COUNT);
for (int i = 0; i < length; i++) {
System.out.println(applicationcoreMngs[i]);
}
System.out.println(length + " Mng record(s) retrieved.");
…
The error:
22:56:02,363 ERROR JDBCExceptionReporter:101 - Unknown column ‘mncat1_.Idpk’ in ‘where clause’
I would appreciate if you could help me find what is wrong.