Mura ORM Feed - Mura Docs v7.1

Mura ORM Feed

As covered in the Feed Bean section, Feed beans allow developers to programmatically query Mura for other beans/objects. These same conventions work for custom entities. That said, if you tested some of the code examples from the Example Mura ORM Entities section, you might have some Person objects created, and you could test some of the Feed bean methods out.

The example below simply demonstrates how simple it is to create a feed of a custom entity, using the same methods described from the Feed Bean section.

// Persons Feed, based on the currently logged in user's userid
feedPersons = m.getFeed('person')
              .where()
              .prop('userid')
              .isEQ(m.currentUser('userid'))
              .sort('namelast', 'asc')
              .sort('namefirst', 'desc');

// Persons Iterator
itPersons = feedPersons.getIterator();