[
https://issues.apache.org/jira/browse/JDO-617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14604267#comment-14604267
]
Andy Jefferson commented on JDO-617:
------------------------------------
I also see no value in this issue *as it is currently defined*, for the same
reasons as Craig.
What I do see potential value in is
1). a "Bulk Update" query where changes are performed to objects of a candidate
type IN THE DATASTORE, *without* the need to refresh the L1/L2 caches, cascade,
lifecycle callbacks etc (other than any cascading the datastore itself performs
via FKs, triggers etc).
2). a "Bulk Delete" query where deletes are performed to objects of a candidate
type IN THE DATASTORE, *without* the need to refresh the L1/L2 caches, cascade,
lifecycle callbacks etc (other than any cascading the datastore itself performs
via FKs, triggers etc).
Note however that the user can get the same effect by delving into SQL (when
using RDBMS), but that throws away datastore independence, hence why I see the
value. These 2 are the "bulk" features provided by DataNucleus right now so no
implementation required to make them available.
> JDOQL : Bulk Update and Delete Operations
> -----------------------------------------
>
> Key: JDO-617
> URL: https://issues.apache.org/jira/browse/JDO-617
> Project: JDO
> Issue Type: New Feature
> Reporter: Eric SULTAN
>
> It would be usefull that the JDO Query Langage could do some UPDATE and
> DELETE on Persistent Object like this :
> UPDATE [<candidate-class>] SET item1=<newValue>, item2=<newValue> [WHERE
> <filter>]
> The new_value specified for an update operation must be compatible in type
> with the state-field to
> which it is assigned.
> Bulk Update must modify the value of the version column and refresh Level1
> and Level2 cache.
> DELETE FROM [<candidate-class>] [WHERE <filter>]
> By default Bulk Delete is appy on the specified class and its subclasses and
> doesn't do cascade delete.
> A keyword like CASCADE must be set if we want to does a cascade delete :
> DELETE CASCADE FROM [<candidate-class>] [WHERE <filter>]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)