Hi folks,
I made an interesting discovery today in the area of GenIL and BOL.
My setup:
I implemented two new objects in the area of component BT.
The hierarchy is as follows:
BTAdminH -> MySetRelation -> BTMySet
BTMySet -> MyObj1 -> BTMyObj
BTMySet -> MyObj2 -> BTMyObj
On base of the relation (MyObj1 or MyObj2) I switch an attribute in the object BTMyObj when it is created. Say this attribute is called TEST and when I create it using relation MyObj1 test = 'ONE' and when I creat id using relation MyObj2 test = 'TWO'.
Works fine the first time I access the objects in the relations. They are initialized correctly.
Now I call some other relation and view some objects in there. Next step I come back to the BTMyObj relation.
Beginning of the odd part:
Regardless of which relation I use, it views the same objects. Meaning the variable test is not different anymore.
I debugged this a little bit and found out, that my objects are cached in the buffer. Fine. I got two relations both with say five objects in them in the buffer. Fine as well. But these objects are the same.
Now I managed to get rid of this behaviour by using different key.
My question: Can someone tell me if it is a normal case that objects that share the same key replace each other, even if they are created using different relations?
Really appreciate any hard facts or even opinions on this.
cheers Carsten