|
Re: Find the referent class in th ecurrent instance [message #420127 is a reply to message #420125] |
Wed, 18 June 2008 16:21 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Yigal,
Comments below.
Yigal wrote:
> I'm somewhat a newbie in EMF and always trying to learn more.
> Here is a question that should be simple but I can not find the answer.
> In my eCore model I've class A that references class B. This is a non
> containment reference.
> If I have an instance of this model in memory, I want to create a
> validation for class B that depends on the values in class A.
> How can I find which class A instance is referencing the current
> instance of class B that the validor is using?
If you don't have a bidirectional references from B back to A, then it
could be referenced by many As so how would that factor in. Perhaps
this ought to be a constraint on A itself...
> (I tried eContaimnet, eContainer, eReference and etc and could not
> figure it out)
Maybe you want the reference to have an EOpposite. I.e., B would have a
reference back to A and those two references would have each other as
opposites (as in the Library's Writer/Book example).
>
> Quick help will be appreciated.
>
> Thanks
> Yigal
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03297 seconds