Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 08:15 Go to next message
abdullah ilhanlı is currently offline 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

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 17:49 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

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.


James : Wiki : Book : Blog : Twitter
Previous Topic:Map<Enum, Entity> table creation works (3 columns), query is wrong (2 values)
Next Topic:NPE during commit
Goto Forum:
  


Current Time: Sat Oct 25 14:43:26 GMT 2014

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

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