How to override relationship query "and not exists"

I'm working on a project where I've created 3 "aliases" of a model for logical reasons. For an example, say I've created a "car" model. I have also created "race car", "passenger car" and "sports car" models. All of these models come from the same "car" table. The "aliased" models are designed so they can be matched against one-to-many junction tables (so for example, a race car would have entries in the "races" table, so for me to get a list of any race card, I just need to query against the "races" table. Now the issue: I'm using relationship manager to handle attaching/detaching records to the parent object (think "manufacturer".) When I try to attach a car that fits in more than one category, my select option will automatically exclude any models that have already been included. In other words, if I say that the Porsche 911 is a race car, if I try to look it up to additionally add it as a sports car, it's automatically excluded from the option results (it adds a "and not exists" to exclude the Porsche, since it's already been selected,) so the user can't choose it. So I want to override the default behavior - I want the user to be able to select any car "model" for any category regardless of existing "attachments" but I've had no luck trying to override the default behavior (modifyQueryUsing, creating custom options, etc.) Any help would be greatlly appreciated!
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?