|
|
|
Re: The parameter name in the query's selection criteria does not match any parameter name defined i [message #657659 is a reply to message #657645] |
Thu, 03 March 2011 15:33 |
Tom Eugelink Messages: 817 Registered: July 2009 |
Senior Member |
|
|
No, I'm not doing anything here, it's the result of a multi-cascade on an object (Relation) being merged into an EM. (Look further up the stacktrace.)
@OneToMany(mappedBy = "iRelationstand", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.RelationstandToCat.class, cascade = {CascadeType.REFRESH,CascadeType.PERSIST,CascadeType.MERGE} )
volatile protected java.util.List<nl.reinders.bm.RelationstandToCat> iRelationstandToCatsWhereIAmRelationstand = new java.util.ArrayList<nl.reinders.bm.RelationstandToCat>();
It only occurs when this merge happens (when the users presses the save button, the screen works fine until then).
On 3-3-2011 16:04, James wrote:
> The query is for the iRelationstandToCatsWhereIAmRelationstand relationship. Please include the mapping for this attribute.
>
> It could be a case issue. Are you using a native SQL query to retrieve the object being merged?
>
> Does this error occur every time you access this relationship, or only in a certain case?
>
|
|
|
|
|
|
|
|
|
Re: The parameter name in the query's selection criteria does not match any parameter name defined i [message #907281 is a reply to message #660756] |
Mon, 03 September 2012 16:47 |
Nuno Godinho de Matos Messages: 34 Registered: September 2012 |
Member |
|
|
In the case I have experienced the navigation definitions were all correct, and there was no bug related to the capslock of the referenced column.
Basically, it seems that eclipselink expectes for atleast one of your @joincolumn annotations to not be flagged as readonly. (e.g. if, (a) all your join columns are NOT falgged as readonly, that is the fields are insertable and updatable, you will get the error stating that you cannot have more than one joincolumn specifying the the target field as wrtiable; (b) if all your joinColumns are flagged as readonly, you will get the error "The parameter name [someField] in the query's selection criteria does not match any parameter name defined in the query.")
To fix it, download the source code, set a break point in the getValue() method that is exploding.
Look at the translation table parameter, see the name of the dabase table contained in this translation object.
Looking at this translation object, you will notice that most of the properties of your database table are contained within it, with the expection of the database FIELD whose name appeared in the exception you obtained.
Finally, find the correnspoding JPA entity that maps to the table in the "translation" parameter and fix the joinColumn annotations in this entity. You must have at least one of them not flagged as read only. (cut away the insertable=false, updatable=false)
Best of luck.
[Updated on: Tue, 04 September 2012 06:42] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.05807 seconds