Hi all,

How about this scenario:
There are three entities: manufacturer, model, car (as an example)
model knows directly which manufacturer it is, car knows which model it is,
but car has to do a model.getManufacturer to find out its manufacturer...

OK, so what I wanna know is can I write a findByManufacturer for car?  I'd
like to be able to do something like this:
query="$model.manufacturer = $1"

Now, I know that I could specify a sub-query with the actual persistence
name of the other entity's thang, something like:
query="$model in (select $model from model where manufacturer_id = $1)"
but it strikes me that Orion won't know what I'm going on about, and best
case, will have to talk to the database each time.  Either way, I had to put
the persistence name into the orion-ejb-jar.xml file, which is not goodness.

Is it possible maybe to say something like:
query="model in ($1)"
where $1 is a Collection of models taken from ModelHome.findByManufacturer?

Any thoughts on the best way to approach this?

Thanks,
Rian
--
Rian Schmidt
[EMAIL PROTECTED]


Reply via email to