[ 
https://issues.apache.org/jira/browse/ISIS-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13765394#comment-13765394
 ] 

Dan Haywood commented on ISIS-528:
----------------------------------

On investigation, it would seem that if "persist(...)" is called, then there's 
a null pointer exception (no adapter exists), but if "persistIfNotAlready(...)" 
is called, then the framework accepts (will automatically create an adapter for 
the transient object)

In order to make things consistent, I've decided to make persist(...) the same 
as "persistIfNotAlready(...)".  This means that an object can be instantiated 
just by new-ing it up.  Javadoc has been updated to describe the downsides of 
doing this: (a) any defaultXxx() won't be honoured, (b) any created() callback 
won't be called, (c) any services won't be injected UNTIL the framework 
persists the object.

Also updated the site:
* 
http://isis.apache.org/applib-guide/how-tos/how-to-01-160-How-to-create-or-delete-objects-within-your-code.html
* http://isis.apache.org/applib-guide/reference/DomainObjectContainer.html
                
> Allow framework to deal with transient objects not instantiated by 
> newTransientInstance.  Improve javadoc.
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-528
>                 URL: https://issues.apache.org/jira/browse/ISIS-528
>             Project: Isis
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: core-1.2.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>             Fix For: core-1.3.0
>
>
> Per this thread: http://markmail.org/thread/wx24e64iydksxzkh.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to