Try SELECT DISTINCT OBJECT(a) FROM Audit a WHERE a.item = ?1
-But I think you're on the wrong forum. This is XDoclet, not JBoss or EJB ;-) Aslak > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Thomas > Quas > Sent: 12. juli 2002 07:35 > To: [EMAIL PROTECTED] > Subject: [Xdoclet-user] EJBQL, = operator and objects > > > Hi, > > I'm experimenting with EJBQL and ran into a problem. My project contains > the lines below and I get deployment errors in JBoss 3.0 stating that > > org.jboss.deployment.DeploymentException: Error compiling ejbql; - > nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: > Encountered "a.item" at line 1, column 39. > Was expecting one of: > "NOT" ... > "(" ... > [snip] > > > I'm wondering whether it's possible at all to use the = operator to > compare objects or if I have to use something else?!?!?!? > > > Thanks for your help, tom > > /* > * @ejb.bean > * type="CMP" > * name="Audit" > * > * @ejb.finder > * signature="java.util.Collection findByItem( tquas.ejb.UUID oid )" > * query="SELECT OBJECT(a) FROM Audit a WHERE a.item = ?1" > * unchecked="true" > */ > > [later...] > > /** > * Returns the oid of the item associated with this entry. > * > * @ejb.interface-method > * @ejb.persistent-field > */ > public abstract UUID getItem(); > public abstract void setItem( UUID oid ); > > -- > thomas quas | "The truth indeed has never been preached by > the Buddha, > [EMAIL PROTECTED] | seeing that one has to realize it within oneself." > | -- Lamkara Sutra -- > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Gadgets, caffeine, t-shirts, fun stuff. > http://thinkgeek.com/sf > _______________________________________________ > Xdoclet-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Gadgets, caffeine, t-shirts, fun stuff. http://thinkgeek.com/sf _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
