NPE when indexing nested entities
---------------------------------

                 Key: QI-61
                 URL: http://issues.ops4j.org/jira/browse/QI-61
             Project: Qi4j
          Issue Type: Bug
          Components: Indexing
    Affects Versions: 0.2
            Reporter: Richard Wallace
            Assignee: Rickard Öberg
         Attachments: association-model.diff

Indexing an Entity like the following

public interface ItemStyleEntity extends ItemStyle, StandardEntity {
    
    interface IterationEntity extends Iteration, StandardEntity {}
}

results in a NPE

Caused by: java.lang.NullPointerException
        at 
org.qi4j.entity.index.rdf.RdfEntityIndexerMixin.indexEntityState(RdfEntityIndexerMixin.java:167)
        at 
org.qi4j.entity.index.rdf.RdfEntityIndexerMixin.index(RdfEntityIndexerMixin.java:78)
        at org.qi4j.entity.index.rdf.RdfIndexerExporterComposite.index(Unknown 
Source)
        at 
org.qi4j.spi.query.IndexingSideEffect.prepare(IndexingSideEffect.java:47)

It looks like this is because the entityState uses 
ItemStyleEntity&IterationEntity for the association name whereas the 
CompositeBinding is using ItemStyleEntity$IterationEntity.

The problem seems to be that when the entityState is being constructed it uses 
the AbstractPropertyInstance.getQualifiedName() method which replaces '$' with 
'&'.  But when AssocationModel is built the AssociationModel.getQualifiedName() 
method doesn't replace the '$' with the '&'.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.ops4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to