Could an entity flag other entities on a per-entity basis, not as a global flag but flagged for just that one entity? Users of course can do this sort of thing by simply favoriting or liking one entity. But can entities flag entities, especially if they're already linked by an entity reference?

My scenario could definitely work better with this feature: on my Commerce-Kickstart site I have subscription products and then magazine products. Customers purchase subscriptions, and the line items on their orders get and set references to specific magazine issues purchased (4 at a time) which are indirectly purchased by the customer. Now to fill this order the products indirectly purchased have to be shipped only periodically, and I'd like a way to flag which issues have been shipped on a per-lineItem basis, instead of creating individual nodes for each printed copy of the magazine. Basically the line item should flag the magazine issue it references as shipped, separating fulfillment of the order from shipment (because the product ordered was a subscription, and only indirectly the products that are shipped out).

The question is, can my line items do their own individual flagging? Not just can it, should it flag? If not, I'll have to rethink my workflow, but this seems like a great use case if it does not already exist. Thoughts?

Comments

cvharris’s picture

Title: Could Entities flag Entities like users do? » Could Entities flag entities like users do?
cvharris’s picture

Issue summary: View changes
joachim’s picture

Status: Active » Closed (won't fix)
Issue tags: -entities, -Entity Reference, -commerce kickstart

What you're talking about is just a relationship between two entities.

Either make an entityref field on your line item entity, or look at RelationAPI if you want something a little more abstract.

Ultimately, a flag is just a relationship between a user and another entity. You could build them with entityref fields on users, but Flag gives you a pretty UI.

(BTW: please don't add keyword tags to issues -- read up on the guidelines for tagging :)

cvharris’s picture

You are absolutely right, I even came to that conclusion last night. Flagging really is a user-oriented module and I feel like it potentially does more than entity references, especially with including fields on them. However my intention was to simply limit a reference field's choices which you can do with an EntityReference view, so Flags was not the way to go.

Thanks for your reply! (and the note on tags...ha)