users@glassfish.java.net

RE: EJBQL Exception

From: Shevland, Joe <joe.shevland_at_capgemini.com>
Date: Tue, 1 May 2007 12:19:43 +1000

> I'm a Java Persistence newbie having a massive problem
> spotting the error that is triggering an Unknown state or
> association field exception.

The rest of the code for Seller and its annotations might make it a bit
easier... have you annotated selcatId getter with a @Column?

I don't think its that (and I'm not sure if JPA enforces having a
relationship defined when you use a join in the EJBQL like that), but
I'd probably tackle it a different way and put a @ManyToOne relationship
on Seller back to SelCat, and in the query just use: "select s from
Seller s where s.category = :pugdog" or along those lines, keeps the
queries simpler and less fragile.

Cheers
Joe

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.