The parameter name in the query's selection criteria does not match any parameter name defi [message #898686] |
Fri, 27 July 2012 08:15 |
abdullah ilhanlı Messages: 2 Registered: May 2012 |
Junior Member |
|
|
Hi everbody,
Recently i got an exception when updating complex object structure with CASCADE.UPDATE
Project use eclipselink jpa version. Default cache is false.
Object structure like below,
Segment- Condition: @OneToMany
Condition-ConditionKey: @ManyToOne
ConditionKey-KeyOption: @OneToMany
When updating segment
with
em.getTransaction().begin();
segment = em.merge(segment);
em.flush();
em.getTransaction().commit();
Eclipselink give me an exception like below,
[EL Warning]: 2012-07-27 11:04:55.481--Exception [EclipseLink-6094] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.QueryException
Exception Description: The parameter name [KEY_ID] in the query's selection criteria does not match any parameter name defined in the query.
Query: ReadAllQuery(name="file:/E:/Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/OCM/WEB-INF/classes/_DialDBModel2_url=jdbc:mysql://192.168.2.212:3306/dial_db?useUnicode=true&characterEncoding=UTF-8_user=dial_db" referenceClass=KeyOption sql="SELECT KEY_OPTION_ID, OPTION_VALUE, KEY_ID FROM KEY_OPTION WHERE (KEY_ID = ?) ORDER BY OPTION_VALUE ASC")
This error occured, when i added new Condtion to Segment. Condition also has its ConditionKey. Data is valid i am sure. I checked several times.
Thank you for your help,
Abdullah İlhanlı
[Updated on: Fri, 27 July 2012 09:46] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03993 seconds