Read Only to Relationships

24 views
Skip to first unread message

Patrick

unread,
Jun 15, 2018, 11:52:40 AM6/15/18
to foam-framework-discuss
Can we add read only features to relationships?

Mike Carcasole

unread,
Jun 15, 2018, 12:22:04 PM6/15/18
to pat...@nanopay.net, foam-framework-discuss
Can you be more specific with what you're trying to do? If you're looking to specific the 'visibility' property on the source or target property, you should be able to do that with the sourceProperty or targetProperty args. So something like:

foam.RELATIONSHIP({
  sourceModel: 'foam.nanos.demo.relationship.Student',
  targetModel: 'foam.nanos.demo.relationship.Course',
  cardinality: '*:*',
  forwardName: 'courses',
  inverseName: 'students',
  targetProperty: {
    visibility: 'RO',
  },
});

This should make the 'students' property on foam.nanos.demo.relationship.Course be marked as read-only.

On Fri, Jun 15, 2018 at 11:52 AM Patrick <pat...@nanopay.net> wrote:
Can we add read only features to relationships?

--
You received this message because you are subscribed to the Google Groups "foam-framework-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Patrick

unread,
Jun 15, 2018, 1:54:12 PM6/15/18
to foam-framework-discuss
Thanks Mike, that's what I was looking for.
To unsubscribe from this group and stop receiving emails from it, send an email to foam-framework-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages