In my object model, I have a type "Template" which has a reference to another type, "Size".

I want to find all templates which have a specific "Size"

I expected this to work:

crit.addEqualTo("size", template.getSize());

but it didn't, apparently because there is no FieldDescriptor for size (it's a reference-descriptor).

This does work:
       crit.addEqualTo("sizeValue", template.getSize().getValue());

sizeValue is the anonymous-access foreign key between Template and Size.

I'm somewhat satisfied since I have something works, but I wonder if it's an oversight that this doesn't work, or is there some deeper reason?

Thanks
        Joe

--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining."
-- Jef Raskin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to