DMZ 1.7.1 (DataMapper OverZealous Edition) |
[eluser]Tom Vogt[/eluser]
[quote author="OverZealous" date="1279065998"] @Tom Vogt You said that an asset only belongs to one user, correct? then why not simply do: Code: $asset->item->get(); That's all items associated with that asset. Since there's only one user per asset, there's no reason to make it more complicated.[/quote] Yes, if you assume that $asset->user is always identical to $item->user - but it isn't. Items can be "borrowed", so to speak. They can be at an asset that does not belong to the item owner. Though in the particular query I want to make, the two are actually identical. I want to filter out the "foreign" items. |
Welcome Guest, Not a member yet? Register Sign In |