Closed sushovannits closed 5 years ago
Thanks for question! Not sure when I'll be able to look into it, but hopefully in the next couple weeks :)
There's no way to directly impose this kind of constraint. I do think it'd be possible to write a visitor that could traverse the ents, get to w0
and check its price compared to c0
's price. This code shows how you can get referenced ents and their attributes.
PS thanks for the good question!
Is there any way we can establish relation between two different entities. e.g.: we have two different entities
car
andwheel
. Now everywheel
refs to acar
. However bothcar
andwheel
has aprice
attribute. The relation I want to establish is:price
ofwheel
w0 which refscar
c0 is not greater than c0's price.Is it possible in specmonstah? I am not sure if insert visitation can be used.