Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] OneToOne Mappings not allowed on Aggregates?

Hi,
We have been using Toplink for quite a few years and are in the process of
migrating to EclipseLink 2.3.0

During our testing, we were surprised that EclipseLink does not support
OneToOneMappings for aggregates, however Toplink does

On EclipseLink, the class AggregateObjectMapping resets the value for
isNullAllowed on method initialize to false, whenever any of the dependent
mapping is 

...
        // disallow null for aggregates with relationships
        for (DatabaseMapping mapping:
getReferenceDescriptor().getMappings()){
            if (mapping.isForeignReferenceMapping() ||
mapping.isAbstractCompositeDirectCollectionMapping()){
                isNullAllowed = false;
            }
        }
...

In this case OneToOneMapping extends from CollectionMapping, which is a
"foreignReferenceMapping"


Can anyone provide an explanation as to why and how to work around this?


Thanks a lot,


Hector Ospina
-- 
View this message in context: http://old.nabble.com/OneToOne-Mappings-not-allowed-on-Aggregates--tp32754669p32754669.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top