[
https://issues.apache.org/jira/browse/OPENJPA-612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fay Wang updated OPENJPA-612:
-----------------------------
Attachment: openjpa0528a.patch
I have streamlined the code and added string function supports to the
updateInMemory. The following queries have been tested against Informix backend:
query="update DeptBeanAno d set d.name = CONCAT(d.name, '288') where
d.reportsTo.no = ?1"
query="update DeptBeanAno d set d.name = SUBSTRING(d.name, 1, LENGTH(d.name))
where d.reportsTo.no = ?1"
query="update DeptBeanAno d set d.name = UPPER(d.name) where d.reportsTo.no =
?1"
query="update DeptBeanAno d set d.name = LOWER(d.name) where d.reportsTo.no =
?1"
query="update DeptBeanAno d set d.name = TRIM(LEADING ' ' FROM d.name) where
d.reportsTo.no = ?1"
query="update DeptBeanAno d set d.name = TRIM(TRAILING ' ' FROM d.name) where
d.reportsTo.no = ?1"
query="update DeptBeanAno d set d.name = TRIM(' ' FROM d.name) where
d.reportsTo.no = ?1"
query="update DeptBeanAno d set d.name = SUBSTRING(d.name, 1, LOCATE(d.name,
'e', 1)) where d.reportsTo.no = ?1"
query="update DeptBeanAno d set d.idx = LOCATE(d.name, 'e', 3) where
d.reportsTo.no = ?1"
> Add support for calculating update value in QueryImpl.updateInMemory
> --------------------------------------------------------------------
>
> Key: OPENJPA-612
> URL: https://issues.apache.org/jira/browse/OPENJPA-612
> Project: OpenJPA
> Issue Type: Bug
> Reporter: Fay Wang
> Attachments: openjpa.patch, openjpa0526.patch, openjpa0528a.patch
>
>
> Since Informix does not support update with in/exists subquery in the where
> clause, when doing the bulk update against informix, e.g.,
> "update DeptBeanAno d set d.budget = (d.budget * ?1 + ?2) where
> d.reportsTo.no = ?3"
>
> we encounter the error of "only-update-primitives" during updateInMemory.
> The attached patch fixes this problem by beefing up the support for
> arithmetic calcuation of the update value for updateInMemory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.