Hi,

> -I have invented a new declarative method to update object databases and I
> would like to introduce that method you.
> 
> My question is:
> Should the functionality of this method included in some future versions of
> JDO (and perhaps some other definitions/systems under Apache)?
> Also I am interested about your comments/critique on the method.
> 
> The name of the method is "embed" and it resembles the command
>   pm.makePersistent(s);
> used in JDO-enabled applications. The embed method is called in equivalent
> way,
>   db.embed(s);
> but it has a larger functionality than the current makePersistent method.

My opinion/comments, others may have other thoughts :

For something to be part of JDO, it needs to be widely applicable across other 
datastores, not just for one "type" of datastore. If it is only implementable 
on 1 type of datastore then standardising it would be "premature"; that isn't 
to say that it isn't applicable to others.

>From what I read of your method it is basically a makePersistent (attach) but 
>with "deleteOrphans" enabled; i.e it addresses the object graph defined by the 
>input object, and additionally deletes orphaned objects. Firstly it is 
>entirely reasonable to be able to do that right now in terms of API 
>(**assuming the JDO implementation provided the internals**) since the user 
>can call pm.makePersistent and can have set properties on the 
>PersistenceManager just before that call (pm.setProperty(...), so can set some 
>"deleteOrphans" flag). From that I can conclude that I don't think there would 
>be any change to the API needed to provide your mode of operation.

Deleting orphans may vary dependent on the precise relation, hence why JDO 
allows metadata on each field, so some orphans can be deleted and others not.

Clearly a JDO implementation would need to provide a "deleteOrphans" mode 
internally to support this.

Detail of how your method works in an object database, whilst interesting, is 
not of relevance to the JDO spec question, since the spec doesn't define HOW an 
implementation implements features


Regards
-- 
Andy
DataNucleus (Web: http://www.datanucleus.org   Twitter: @datanucleus)

Reply via email to