openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Markku.Saar...@tieto.com>
Subject RE: Failed to use enhanced Embedded class instance as parameter for query.
Date Thu, 19 Mar 2009 10:42:22 GMT
Yes. 


Terveisin / Best regards

Markku Saarela, Senior Consultant
TietoEnator Finland Oy, TGT Telecom / FITO PC Finland Operators

-----Original Message-----
From: Mark Struberg [mailto:struberg@yahoo.de] 
Sent: 19. maaliskuuta 2009 12:41
To: users@openjpa.apache.org
Subject: AW: Failed to use enhanced Embedded class instance as parameter for query.


just to make sure: your embedded class is listed as <class> in your persistence.xml?

LieGrue,
strub

--- Markku.Saarela@tieto.com <Markku.Saarela@tieto.com> schrieb am Do, 19.3.2009:

> Von: Markku.Saarela@tieto.com <Markku.Saarela@tieto.com>
> Betreff: Failed to use enhanced Embedded class instance as parameter for query.
> An: users@openjpa.apache.org
> Datum: Donnerstag, 19. März 2009, 10:31 Hi, Using Open JPA 1.2.0 and 
> jdk 1.6.0_12 .
> 
> Failed to use enhanced Embedded class instance as parameter for query.
> If this enhanced parameter instance is replaced inplace instantiated 
> instance of this Embeddable class then the query works. I tried to 
> lookout if someone has allready faced this problem and filed a bug but 
> no luck. Should i file a bug?
> 
> org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue
> invokes
> org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.getJoinValue(
> Op enJPAStateManager,Column,JDBCStore). In that method from 
> StateManager is tried to fetch field by index which is wrong, because 
> ClassMapping is for this Embeddable class which in my case has only 
> one field and index is three so no field is found giving error:
> 
> org.apache.openjpa.persistence.ArgumentException: Field "3"
> is not
> declared in "class
> org.apache.openjpa.enhance.<package><Embeddable
> Class>$pcsubclass", or is not managed.
> 
> Terveisin / Best regards
> 
> Markku Saarela, Senior Consultant
> 
> TietoEnator Finland Oy, TGT Telecom / FITO PC Finland Operators email 
> markku.saarela@tieto.com, mobile +358 (0)40 590 6505 Kutojantie 6 - 8, 
> FI-02630  Espoo, Finland, www.tieto.com
> 
> Meet the new Tieto: www.tieto.com/newtieto
> 
> Please note: The information contained in this message may be legally 
> privileged and confidential and protected from disclosure.
> If the reader
> of this message is not the intended recipient, you are hereby notified 
> that any unauthorised use, distribution or copying of this 
> communication is strictly prohibited. If you have received this 
> communication in error, please notify us immediately by replying to 
> the message and deleting it from your computer. Thank You.
> 
> 


      

Mime
View raw message