Entity Type resolution is flawed
--------------------------------
Key: QI-232
URL: http://issues.ops4j.org/browse/QI-232
Project: Qi4j
Issue Type: Improvement
Affects Versions: 1.0
Reporter: Niclas Hedhman
Assignee: Rickard Öberg
If we have;
public interface Abc extends EntityComposite
{}
public interface Def extends Abc
{}
public interface Rst extends Def, EntityComposite
{}
and
module.addEntities( Rst.class );
it is not possible to do
uow.newEntityBuilder( Def.class );
since Def is an instanceof EntityComposite, which will in EntityFinder do a
equals() between the mixinType and the entity composite. This was introduced to
handle that two different EntityComposites are registered with the same base
mixins, but lookup is allowed against the exact match of the entity composite
itself.
I think the current algorithm is suboptimal, and that the isAssignableFrom()
test should simply be removed, with the mixinType.equals() be moved up a level,
as entityModel.type() will only ever contain a registered EntityComposite.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.ops4j.org/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