I found the solution by myself. I post it here. Perhaps it helps other peoples out of trouble.
The problem was that the field of the object which i used was an object itself and I did not specifiy the field of the object.
In short:
This section in the SQL:
Code:
pricedata2_.product in (
? , ? , ?
)
)
and (
pricedata2_.product_unit in (
? , ? , ?
)
)
need to be look like this:
Code:
pricedata2_.product.id in (
? , ? , ?
)
)
and (
pricedata2_.product_unit.id in (
? , ? , ?
)
)
Another example:
Pricedata has a many to one relationshipt to product
snippet from pricedata object:
....
@ManyToOne
@JoinColumn("product")
private Product product;
Wrong:
Select pd from priceData pd where pd.product in (100, 200);
Right:
Select pd from priceData pd where pd.product.id in (100, 200);