I was in similar situation some time back, I have a old table (Old – since I can’t change the table, since it used by many application and I have to debug all of them, if I can anything in that table.)
It did not have any primary key, and when I used the middlegen tool to get the mapping files, if table doesn’t have primary key, it will generate all of them a composite key.
For loading you can write quires, but you cannot update them, since all of them are keys now and you cannot update the records.
So I have make a good choice from that table and change the mapping class file class.hbx.xml file to make one or 2 as keys (Which I was sure that, they will not be updated).
And then I was able to get, save and update the records.
srigold
|