Allowed Property Annotation

The allowed annotation for entity properties provides a way to restrict the choices the user has when the property is used in an input:

entity Person{
  friends -> Set<Person> (allowed=from Person as p where p != this)
}
var p1 := Person{}
define page root(){
  form{
    input(p1.friends)
    submit action{} {"save"}
  } 
}

The allowed collection can be accessed through an entity function with name allowed[PropertyName], e.g. p1.allowedFriends()

Allowed Property Annotation