openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@gmail.com>
Subject Re: Update Query with Inherited Attributes
Date Mon, 21 Jan 2008 23:53:28 GMT
Hi,

Can you describe the mappings for the Director class?

-Patrick

On Jan 17, 2008 11:37 PM, the666pack <mario.kofler@gmail.com> wrote:
>
> hello,
>
> i try to execute the following query with openJPA:
>
>             updateFields = em.createQuery("UPDATE " + type + " AS p " +
>                                                                        "SET p.origin
= :origin " +
>                                                                         "WHERE UPPER(p.name)
LIKE :name");
>
> while the variable "type" is set during runtime to a child-entity from
> "person" and p.origin is an attribute of the mother-entity "person".
>
> when i try to execute this query i get the following exception:
>
> <1.0.0-r561970-r561970 nonfatal general error>
> org.apache.openjpa.persistence.PersistenceException: ERROR: column "origin"
> of relation "director" does not exist {prepstmnt 32680181 UPDATE director
> SET origin = ? WHERE id IN (SELECT DISTINCT t0.id FROM director t0 INNER
> JOIN person t1 ON t0.id = t1.id WHERE (UPPER(t1.name) LIKE ? ESCAPE '\\'))
> [params=(String) t, (String) %t%]} [code=0, state=42703]
>
> is this a known issue in openJPA?
>
> thank you for your help,
>
> greetings,
>
> mario
>
> --
> View this message in context: http://www.nabble.com/Update-Query-with-Inherited-Attributes-tp14947982p14947982.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>



-- 
Patrick Linskey
202 669 5907

Mime
View raw message