polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject ManyAssociation a List or a Set?
Date Thu, 15 Jun 2017 07:54:16 GMT
Gang,

I found a quite serious bug in DefaultNamedAssociation, but since
MapEntityStore didn't user the "UPDATED" information about an entity, it
didn't manifest itself other than in the Preference and Cassandra ES
implementations, not using the MapES.

So, I went to check if the same fault was in the ManyAssociation and to my
surprise, I saw the following code;

if( references.contains( entityReference ) )
{
    return false;
}

references.add( i, entityReference );
entityState.markUpdated();
return true;


which means that it is a SET and not a LIST/SEQUENCE. But we have method
toList() and toSet() on ManyAssociation, as I think we originally intended
the internals to be a LIST.

Does anyone have any insight and opinion on this topic?


Cheers
-- 
Niclas Hedhman, Software Developer
http://polygene.apache.org - New Energy for Java

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message