This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have encountered following error in NBMDR: I have model, whose extent is ParentPackage, for instance. From that extent I obtain a subpackage - ChildPackage (method ParentPackage.getChildPackage(). If I later invoke ChildPackage.refImmediatePackage(), then it is quite obvious, that again I get the same ParentPackage instance. BUT This ain't true if In meantime I create a new instance of repository, load a definition of some meta-model in it and create extent for that meta-model. Although I get an instance of ParentPackage after invoking ChildPackage.refImmediatePackage(), it is not the original one (equals doesn't return true). Note: I perform everything in DIFFERENT instance of repository and use only ONE instance of JVM.
Created attachment 7241 [details] It fix probrem with equals of BaseObjectHandler's
It is caused by defect imlementation of method equals in BaseObjectHandler. I found this problem when I was been registered as listener on extent and I received no Event due this bug.
Hi, thanks for investigating this, however I cannot integrate your patch. The thing that you've fixed was intentionally there. It improves performance. Could you please shed some more light into why there are two instances of BaseObjectHandler for the same MOFID? It should never happen. Do you have the most recent version of MDR? I remember that a fix that Dan Prusa made a while ago to the repository (fixing the problems that arised after rollback) caused this bug, thus I rolled it back and we found a different fix. So maybe the solution for you could be to update the MDR with the latest sources. Or is it already the case?
The bug should be fixed in the most current builds (by a fix made by Dan Prusa to btree storage).