From: <fab...@us...> - 2009-05-15 22:59:19
|
Revision: 4323 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4323&view=rev Author: fabiomaulo Date: 2009-05-15 22:59:12 +0000 (Fri, 15 May 2009) Log Message: ----------- Fix NH-1780 and related Modified Paths: -------------- trunk/nhibernate/doc/reference/modules/component_mapping.xml trunk/nhibernate/doc/reference/modules/example_parentchild.xml Modified: trunk/nhibernate/doc/reference/modules/component_mapping.xml =================================================================== --- trunk/nhibernate/doc/reference/modules/component_mapping.xml 2009-05-15 22:37:17 UTC (rev 4322) +++ trunk/nhibernate/doc/reference/modules/component_mapping.xml 2009-05-15 22:59:12 UTC (rev 4323) @@ -270,14 +270,14 @@ </para> <para> - You may instead implement <literal>IInterceptor.IsUnsaved()</literal> if + You may instead implement <literal>IInterceptor.IsTransient()</literal> if you wish to use <literal>SaveOrUpdate()</literal> or cascading save / update. As an alternative, you may also set the <literal>unsaved-value</literal> attribute on a <literal><version></literal> (or <literal><timestamp></literal>) element to specify a value that indicates a new transient instance. In this case, the version of the entity is used instead of the (assigned) identifier and you don't have - to implement <literal>IInterceptor.IsUnsaved()</literal> yourself. + to implement <literal>IInterceptor.IsTransient()</literal> yourself. </para> <para> Modified: trunk/nhibernate/doc/reference/modules/example_parentchild.xml =================================================================== --- trunk/nhibernate/doc/reference/modules/example_parentchild.xml 2009-05-15 22:37:17 UTC (rev 4322) +++ trunk/nhibernate/doc/reference/modules/example_parentchild.xml 2009-05-15 22:59:12 UTC (rev 4323) @@ -310,7 +310,7 @@ <para> There is one further possibility. There is a new <literal>IInterceptor</literal> method named - <literal>IsUnsaved()</literal> which lets the application implement its own strategy for distinguishing + <literal>IsTransient()</literal> which lets the application implement its own strategy for distinguishing newly instantiated objects. For example, you could define a base class for your persistent classes. </para> @@ -338,11 +338,12 @@ <para> (The <literal>saved</literal> property is non-persistent.) - Now implement <literal>IsUnsaved()</literal>, along with <literal>OnLoad()</literal> + Now implement <literal>IsTransient()</literal>, along with <literal>OnLoad()</literal> and <literal>OnSave()</literal> as follows. </para> - <programlisting><![CDATA[public object IsUnsaved(object entity) + <programlisting> + <![CDATA[public object IsTransient(object entity) { if (entity is Persistent) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |