|Search for all references to a specific instance [message #616078]
||Fri, 04 April 2008 18:43
| Yigal Spinner
Registered: July 2009
I'm using TENEO and hibernate on a very large model and complex |
I want to create a class that gives me all the parent instances that
reference one specific child instance.
Let assume I have an eCore model that represent a car. The engine (one
class) as a reference (association) to screw (common class) that is used
in the engine. The same for the transmission, AC and etc. That means
in the model the class instance "screw1" is referenced by many other
instances of the other classes.
If I have an instance of "screw1", I want to find out which instance
references this "screw1" (for example write a report if the screw
changes which component gets impacted - engine transmission and etc.).
Since my database is large, I disabled the Hibernate option to load all
top classes when a new resource is created.
I used the utility EcoreUtil.UsageCrossReference.find(<screw1>,
resourceSet), but it does not return any information.
How can I search the entire database to find all the references to a
Powered by FUDForum
. Page generated in 0.02157 seconds