Hi Lachlan,

On May 30, 2007, at 11:19 PM, Lachlan Deck wrote:

Hi Craig,

On 31/05/2007, at 4:13 PM, Craig L Russell wrote:

On May 30, 2007, at 8:19 PM, Lachlan Deck wrote:

However, my question remains this: if not defined in a relationship where does the developer define the delete rules etc? Or are you suggesting they don't get an option?

In an inheritance situation, there is only one instance corresponding to the rows (one row in each table in the hierarchy). I'm suggesting that there is no option. If the instance is deleted, then the row in each table is deleted.

That's fine when the parent is abstract (i.e., not instantiatable). What about when the parent is not abstract and where it is thus possible to simply fetch/instantiate the parent entity on its own. What happens when the user deletes the parent object in such a situation? Should I not get the choice?

I don't believe that you should be able to fetch the parent entity on its own. IMHO If you allow the parent entity to be fetched and don't also fetch the data from the subclass then you have a broken mapping. The user should not be allowed to get a partial instance (data from the parent table only) because then the whole Java concept of subclasses overriding behavior doesn't work any more.

Craig

with regards,
--

Lachlan Deck




Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to