Previous | Next
WireHose Developers Guide

Relating items to feeds

First you'll add a "feedID" attribute to RSSItem.

  1. Select the RSSItem entity.
  2. Choose Add Attribute from the Property menu.
  3. Set its prototype to whIntegerID.

    Note: By convention, all primary key attributes in a WireHose application use the "whIntegerID" prototype, except for WHTag, which uses "whBinaryID". Both these prototypes are defined as INTEGER columns by default.

    WireHose provides special support for using binary primary keys. WireHose will generate them for you, and encode a reference to the entity directly in the primary key itself. This can improve performance by avoiding extra fetches when resolving to-one faults against abstract entities.

  4. Remove the padlock icon so this attribute isn't used for locking.
  5. Remove the diamond icon so this attribute isn't a class property.
  6. Check the "Allows null" column so this attribute can be null
  7. Set the attribute's name to feedID, and set its column name to FEEDID.

Next, add the relationship.

  1. Choose Add Relationship from the Property menu.
  2. Choose Inspector... from the Tools menu.
  3. Set the relationship type to To One.
  4. Change the destination model to RSSFeed.

    Note: You may need to quit and relaunch EOModeler to see RSSFeed in the destination model popup.

  5. Change the destination entity to RSSFeed.
  6. Set the source attribute to feedID, and the destination attribute to resourceID.
  7. Click Connect.
  8. Change the relationship's name to feed.

Previous | Next