[jboss-jira] [JBoss JIRA] (DROOLS-1082) Querying for objects before any have been inserted prevents Class Aware Object Store from working properly

James Elford (JIRA) issues at jboss.org
Mon Mar 7 20:41:00 EST 2016


    [ https://issues.jboss.org/browse/DROOLS-1082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173219#comment-13173219 ] 

James Elford commented on DROOLS-1082:
--------------------------------------

I've started a pull request for this: https://github.com/droolsjbpm/drools/pull/677

> Querying for objects before any have been inserted prevents Class Aware Object Store from working properly
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: DROOLS-1082
>                 URL: https://issues.jboss.org/browse/DROOLS-1082
>             Project: Drools
>          Issue Type: Bug
>    Affects Versions: 6.3.0.Final
>            Reporter: James Elford
>            Assignee: Mark Proctor
>
> In the presence of a class heirarchy, the {{ClassAwareObjectStore}} doesn't properly manage the relationships between {{SingleClassStores}} - specifically, it can become permanently corrupt if the following order of events occurs:
> * Insert object of type {{BaseClass}}
> * Query for objects of type {{SubClass}}
> ** Note that it's important this query is fully evaluated (e.g. copy it into a list)
> * Insert object of type {{SubClass}}
> Subsequent queries for objects of type {{BaseClass}} will _not_ return objects of type {{SubClass}}. If the intervening query for {{SubClass}} is left out, they would.
> The problem's in {{ClassAwareObjectStore#getOrCreateConcreteClass}}, where it tries to concretize an existing (non-concrete) store. It should go through the same "linking" process that gets done in the {{existingStore == null}} case (and half of which is done already in {{#getOrCreateClassStore}}).



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list