Hi Flavio,

What you are looking for is a simple ManyToMany association between
InventoryItem and InventoryTag: nothing fancy in there, and should also be
quick enough for simple searches.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

On 8 April 2015 at 18:11, Flavio Giannini <[email protected]> wrote:

> Hey guys, i'm pretty new with Doctrine and i'm struggling about finding a
> good way to implement a fast search based on tags. Let me explain it better.
>
> I have an INVENTORY_ITEMS table where each row (item) can be tagged with
> many tags. For example a "Laptop" item can be tagged as "Electronic",
> "Office", "PC" ecc...
>
> My solution at the moment is having a foreing table INVENTORY_ITEM_TAG
> (id, inventory_item_id, tag_name) which i can run a join query to mach the
> result.
> It doesn't sound very elegant, and fast isn't it?.
>
> Any suggestion?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to