Ive got a couple of entities which are related to each other but are rarely needed and contain a large amount of data.
The objects are linked by a primary key, so lets say "company.id" and "group.company_id". Now the group entity does not contain a property called "CompanyID" mainly because its only used when inserting and then never changed afterwards, so i thought it would be redundant to have within the entity.
Now i need to be able to retrieve a list of groups based on the company_id, but as the property is not within the entity i cannot seem to do it via the criteria, and if i do the SQL manually it doesnt seem to map it properly and i cant find any examples, so i was wondering if anyone had any details on how to achieve this...
|