Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


You MUST register your taggable entities prior to attempting any tagging operations. The framework will throw an exception scolding you if you do not.
By default, your EOModels are modified on-the-fly to inject tagging support into them. If you don't like magic, you can instead manually create the join entity between your entity and the ERTag entity. You MUST also create a flattened to-many relationship from your entity to the ERTag table through your join entity. If you name that relationship anything other than "tags" (or you use a custom ERTag entity), you must specify the relationship name when you register the entity.
Tags are unique and shared. To ensure this, ERTag commits new tag names in a separate transaction. This can lead to a potentially undesirable (yet mostly harmless) side effect where new tag names may be committed even though you roll back your editing context. Only tag names have this behavior, not tag relationships on your entities.

Wiki MarkupIf you don't want to use the migration, you need to create a join table that contains a "your entity id" (named item_\[WONDER:your pk column name\] for each pk attribute) and an ERTagID foreign key (named tag_id). You can name the columns whatever you want if you also manually create the join entity in your EOModel.