I'm sorry for asking what may be a silly question, but is it possible to query the database using a Criteria that includes a field that is in a m:n relationship, but not intrinsically in the class.

For example:

class widget {
        Integer id
        String name

        Collection allCategories() (ojb.collection to widget_category)
}

class category {
        Integer id
        String name
        Integer parent_id
}

// indirection table/class
class widget_category {
        Integer widgetId
        Integer categoryId
}

With all of the associated tables and OJB mappings...

Is it possible to create a criteria that says "Give me all Widgets in Category X"? Or is is possible to do a "query by example"?

-=-= -=-= -=-= -=-= -=-= -=-= -=-= -=-= -=-= -=-= -=-=-
Marcus Breese                            [EMAIL PROTECTED]
IU School of Medicine              [EMAIL PROTECTED]
Dept. of Biochemistry and Molecular Biology
Center for Medical Genomics / Grow Lab


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



Reply via email to