Hello
Newbie.
Suppose I have a PhotoAlbum class that contains a Set of Photos.
The Photos collection is mapped as a component.
Ultimately this is backed by a "Photos" table containing Id, Photoname and Location fields.
Suppose there is an Order class that also comprises a Set of Photos. Note that the Order and PhotoAlbum classes are unrelated for this exercise.
My question is, can the Order and PhotoAlbum classes use the same "Photos" table? I thought not because the primary key of the Photos table is associated with PhotoAlbum class only. Basically, although I have one Photos class, if I use it as a value type then do I have to define two Photos SQL tables (one for the PhotoAlbum and one for the Order)? One class, two tables.
Thanks
Mark
|