users@glassfish.java.net

Re: The class of the argument for the object comparison is incorrect.

From: <glassfish_at_javadesktop.org>
Date: Tue, 21 Aug 2007 10:40:17 PDT

Hi Marius,

I'm not sure how your entity actually look like - the code in the link has all annotations commented out, but the person field is either a relationship (and must be marked as such) or a BLOB (i.e. expected to be stored as a serializable stream). In any case, you can't compare it to a String or an integer. When you use SQL, you most probably compare the value in the FK column directly, which of course works.

Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

http://forums.java.net/jive/thread.jspa?messageID=231855