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.

Bug 26354 - Incorrect handling of 1:n associations
Summary: Incorrect handling of 1:n associations
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-07 17:43 UTC by Stepan Roh
Modified: 2010-09-23 09:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stepan Roh 2002-08-07 17:43:58 UTC
Repository will permit user to violate 1:n
associations with serious consequences.

Situation:

RefClass X
RefClass Y
Association AXY: end1 E type Y multiplicity (0,-1)
                 end2 F type X multiplicity (0, 1)

RefObject X1 of type X
RefObject X2 of type X
RefObject Y1 of type Y

X1.getE().add(Y1)
X2.getE().add(Y1) // violation of 1:n association

AXY.refAllLinks() = [ X1-Y1 ]
X1.getE() = [ Y1 ]
X2.getE() = [ Y1 ] // inconsistent results

Y1.refDelete()
X1.getE() = [ ]
X2.getE() = // error

org.netbeans.mdr.persistence.StorageBadRequestException:
No record exists with key SOME-MOFID-HERE
	at
org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeDatabase.noSuchRecord(BtreeDatabase.java:939)
	at
org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeDatabase.get(BtreeDatabase.java:740)
	at
org.netbeans.mdr.storagemodel.MdrStorage.resolve(MdrStorage.java:1568)
	at
org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage.resolveObject(BtreeStorage.java:403)
	at
org.netbeans.mdr.persistence.btreeimpl.btreeindex.MOFIDInfo.objectFromBuffer(MOFIDInfo.java:136)
	at
org.netbeans.mdr.persistence.btreeimpl.btreeindex.BtreeListByKey$BtreeListByKeyIterator.getCurrentItem(BtreeListByKey.java:217)
	at
org.netbeans.mdr.persistence.btreeimpl.btreeindex.BtreeListByKey$BtreeListByKeyIterator.next(BtreeListByKey.java:142)

[ this is not from refDelete, sorry, so I will cut
it here ]
Comment 1 David Strupl 2010-09-23 09:03:27 UTC
I am closing all reports in category Java/Unsupported as wontfix. These should be dead issues --- if the reported cases are against some live part of the NetBeans IDE please reopen and we can discuss to which category they belong.