Skip to content

Feature: Send endpoint for relations

This would mimic the relast-API. is that a problem?

DSL:

send Model.MyA;
send Model.MyOtherA;
send Model.AllMyA;

Changed grammar:

-rel Model.MyA -> A;
+rel Model._ragconnect_delegate_MyA -> A
 
-rel Model.MyOtherA? -> A;
+rel Model._ragconnect_delegate_MyOtherA? -> A
 
-rel Model.AllMyA* -> A;
+rel Model._ragconnect_delegate_AllMyA* -> A

Generated Aspect:

public void Model.setMyA(A value) {
  set_ragconnect_delegate_MyA(value);
  // some send logic
}
public A Model.getMyA() {
  return get_ragconnect_delegate_MyA();
}
// ... lots of relast methods for changing and accessing other two relations ...

or using refine 🤔 without grammar changes

refine RelAstAPI public void Model.setMyA(A value) {
  refined();
  // some send logic
}
// ... other relast methods for changing other two relations ...