Hi,
is there anybody out there who has a code sniplet that shows me how to create a toMany relation during runtime. I successfully created a toOne relation already with
mtoValue = new ManyToOne(table);
column = new Column("ORIGIN");
column.setNullable(true);
mtoValue.addColumn(column);
// mtoValue.setReferencedPropertyName("code");
mtoValue.setReferencedEntityName("Locations");
property = new Property();
property.setName("Start");
property.setValue(mtoValue);
property.setInsertable(false);
property.setUpdateable(false);
pClass.addProperty(property);
Any help welcome, thanks in advance,
Oliver
|