[ 
http://issues.ops4j.org/browse/QI-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13732#action_13732
 ] 

Stanislav Muhametsin commented on QI-274:
-----------------------------------------

Uhm, I guess? I really can't remember anymore what was the real problem with my 
usecase. Maybe if lifecycle relies too much on constraints on entity-state, it 
might not get ecxeptions it expects, when it is operating with prototype state. 
This is quite marginal to happen, tho. Just is (IMO) a little ugly and more 
break-prone to have asymmetry like this.

> 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

Reply via email to