Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » The parameter name in the query's selection criteria does not match any parameter name defi(Cascade Merge)
The parameter name in the query's selection criteria does not match any parameter name defi [message #898686] Fri, 27 July 2012 04:15 Go to next message
Eclipse UserFriend
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 05:46] by Moderator

Re: The parameter name in the query's selection criteria does not match any parameter name defi [message #899665 is a reply to message #898686] Wed, 01 August 2012 13:49 Go to previous message
Eclipse UserFriend
Include the exception stack and log on finest. It most likely has to due with the complexity of your object, perhaps you have cycles and are missing some merge cascading.
Try simplifying your object model or merge the object manually, or in smaller parts.

If you can simplify your code into a test you could log a bug for the issue.
Previous Topic:Map<Enum, Entity> table creation works (3 columns), query is wrong (2 values)
Next Topic:NPE during commit
Goto Forum:
  


Current Time: Tue Jul 22 20:47:57 EDT 2025

Powered by FUDForum. Page generated in 0.02959 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top