Hi All.

I want to write a finder that finds the parent objetc for a 1:1 relation. Wirth a 
1:many relation, i can use the IN operator, but with a 1:1, I got no idea what to do.
My EntityBeans look like this:

TempData: 
uuid: String
name: String
binaryData: BinaryData
tumbnailImage: BinaryData
previewImage: BinaryData 
[...]

BinaryData:
uuid: String
name: String 
[...]

When I try using a statement like 
@ejb.finder
signature = "TempDatenLocal findTempDataByBinaryData(java.lang.String binaryDataId)"
query="
SELECT OBJECT(a)
FROM TempData AS a, IN(a.binaryData) AS b
WHERE (b.uuid = ?1)
"

I get  this:

org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT 
OBJECT(a) FROM TempData as a, in(a.binaryD
ata) as b WHERE (a.uuid = ?1)'; - nested throwable: 
(org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "a.binaryData" at line 1, 
column 44.
Was expecting:
    <COLLECTION_VALUED_PATH> ...
    )


Any Idea, how I can make this finder work???

Thanks in advance,
Sascha.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3847820#3847820

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3847820


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to