Thank you for your answers.
>>Is that really ALL your mapping file has in it?
No, the column mappings are there,too :).
>>If there is no PK, you should find a combination of columns which are unique, and map them as an "embedded" composite id.
I do not have desinger access to the view, so i cannot change it.
>> P.S. The query you showed is probably incorrect. Property names should *always* be prefixed by an alias.
Sorry it is my failure, I have an alias. The generated sql was absolute OK, the only problem was,that the id column was in the generated sql, too.
The documentation for "id" tag says:
"If the name attribute is missing, it is assumed that the class has no identifier property. "
That's why i thought, if one doesn't specify a name for the "id" tag, the generated sql will not contain the id column.
Do i understand it false?
|