fmz wrote:
domain object created only need a few fields from the underlaying table, therefore, some of the PK columns are not presented in the domain object, not sure how to deal with this case.
And also when querying the object the condition will involve some of the fields that is not presented in the domain.
Relation between database data and domain objects is not clear. Am I right assuming that you just create domain objects on the stored data basis (not including all PK information)? Do you need to change domain object state and persist them after that or all you need is just to load particular data and don't bother with saving its updated state?