Different behaviour in UnitOfWork.newEntity(...) and EntityBuilder.newInstance()
--------------------------------------------------------------------------------
Key: QI-274
URL: http://issues.ops4j.org/browse/QI-274
Project: Qi4j
Issue Type: Bug
Components: Core Runtime
Affects Versions: 1.2
Environment: Qi4j.
Reporter: Stanislav Muhametsin
Assignee: Rickard Öberg
Fix For: 1.3
Attachments: creating_entity.zip
When creating an entity via UnitOfWork.newEntity() method, it gets initialized
in a different way than when creating it via EntityBuilder.newInstance(). If
one has Lifecycle-mixin, that mixin gets actual entity state when using UoW
method, and gets prototype state when using EntityBuilder.
If this is not a desired behaviour, then one way of doing things should be
chosen and used uniformly throughout the APIs designated for creating an entity.
If this is a desired behaviour, then it should be clearly documented.
Additionally, there must be a way to check via API whether the state is
prototype or actual instance.
Test-case attached.
--
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