tenwit wrote:
In hibernate you have the option to declare composite-ids as mapped or unmapped. If you map them (using class="xxx") then getId() will return an instance of the class you specify. If you don't map them, then the properties are available directly from the main class. Have a look at section 5.1.5 of the ref docs for more info.
If you don't define an <id> element in your class mapping, then the mapping won't compile, so your other question is moot.
I know that defining <id> element im my class mapping file is necessary. But
I was not asking about id element im my mapping file but I was asking about how and where id is store in this case:
Code:
<id column="CATEGORY_ID">
<generator class="native"/>
</id>