|
From: NHibernate J. <nh...@gm...> - 2010-01-12 16:07:53
|
Laconic error message - "object references an unsaved transient instance"
-------------------------------------------------------------------------
Key: NH-2070
URL: http://nhjira.koah.net/browse/NH-2070
Project: NHibernate
Issue Type: Improvement
Components: Core
Affects Versions: 2.1.2.GA
Reporter: Krzysztof Koźmic
Priority: Minor
In case when Merging object referencing transient instance NHibernate throws error:
"NHibernate.TransientObjectException : object references an unsaved transient instance - save the transient instance before flushing. Type: Foo, Entity: Foo"
This is not very helpful in diagnosing the problem as it does not say how the object is referenced.
A more helpful message would be:
"NHibernate.TransientObjectException : Property Bar on object Foo is set to a transient object BarImpl- save the transient BarImpl before flushing (or set cascade action for the property to something that would make it autosave). Type: Foo, Entity: Foo"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://nhjira.koah.net/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: NHibernate J. <nh...@gm...> - 2010-01-12 22:58:14
|
[ http://nhjira.koah.net/browse/NH-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18980#action_18980 ]
Jose F. Romaniello commented on NH-2070:
----------------------------------------
BarImpl is the type assigned to the property Bar or the ToString() representation?
> Laconic error message - "object references an unsaved transient instance"
> -------------------------------------------------------------------------
>
> Key: NH-2070
> URL: http://nhjira.koah.net/browse/NH-2070
> Project: NHibernate
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.1.2.GA
> Reporter: Krzysztof Koźmic
> Priority: Minor
>
> In case when Merging object referencing transient instance NHibernate throws error:
> "NHibernate.TransientObjectException : object references an unsaved transient instance - save the transient instance before flushing. Type: Foo, Entity: Foo"
> This is not very helpful in diagnosing the problem as it does not say how the object is referenced.
> A more helpful message would be:
> "NHibernate.TransientObjectException : Property Bar on object Foo is set to a transient object BarImpl- save the transient BarImpl before flushing (or set cascade action for the property to something that would make it autosave). Type: Foo, Entity: Foo"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://nhjira.koah.net/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: NHibernate J. <nh...@gm...> - 2010-01-14 08:28:50
|
[ http://nhjira.koah.net/browse/NH-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18989#action_18989 ]
Krzysztof Koźmic commented on NH-2070:
--------------------------------------
I don't think you should do .ToString() - type.ToString is safer. You don't want to leak potentially sensitive information in exceptions, plus it could be less helpful.
> Laconic error message - "object references an unsaved transient instance"
> -------------------------------------------------------------------------
>
> Key: NH-2070
> URL: http://nhjira.koah.net/browse/NH-2070
> Project: NHibernate
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.1.2.GA
> Reporter: Krzysztof Koźmic
> Priority: Minor
>
> In case when Merging object referencing transient instance NHibernate throws error:
> "NHibernate.TransientObjectException : object references an unsaved transient instance - save the transient instance before flushing. Type: Foo, Entity: Foo"
> This is not very helpful in diagnosing the problem as it does not say how the object is referenced.
> A more helpful message would be:
> "NHibernate.TransientObjectException : Property Bar on object Foo is set to a transient object BarImpl- save the transient BarImpl before flushing (or set cascade action for the property to something that would make it autosave). Type: Foo, Entity: Foo"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://nhjira.koah.net/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Fabio M. (JIRA) <nh...@gm...> - 2010-12-13 11:54:44
|
[ http://216.121.112.228/browse/NH-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabio Maulo updated NH-2070:
----------------------------
Summary: Better error message for "object references an unsaved transient instance" (was: Laconic error message - "object references an unsaved transient instance")
> Better error message for "object references an unsaved transient instance"
> --------------------------------------------------------------------------
>
> Key: NH-2070
> URL: http://216.121.112.228/browse/NH-2070
> Project: NHibernate
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.1.2.GA
> Reporter: Krzysztof Koźmic
> Priority: Minor
>
> In case when Merging object referencing transient instance NHibernate throws error:
> "NHibernate.TransientObjectException : object references an unsaved transient instance - save the transient instance before flushing. Type: Foo, Entity: Foo"
> This is not very helpful in diagnosing the problem as it does not say how the object is referenced.
> A more helpful message would be:
> "NHibernate.TransientObjectException : Property Bar on object Foo is set to a transient object BarImpl- save the transient BarImpl before flushing (or set cascade action for the property to something that would make it autosave). Type: Foo, Entity: Foo"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-30 19:31:42
|
[ http://216.121.112.228/browse/NH-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabio Maulo resolved NH-2070.
-----------------------------
Resolution: Fixed
Fix Version/s: 3.2.0Beta2
Fixed adding "or set cascade.." stuff.
The property involved is not available in that context.
There are other places where the same exception can show the property involved.
> Better error message for "object references an unsaved transient instance"
> --------------------------------------------------------------------------
>
> Key: NH-2070
> URL: http://216.121.112.228/browse/NH-2070
> Project: NHibernate
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.1.2.GA
> Reporter: Krzysztof Koźmic
> Priority: Minor
> Fix For: 3.2.0Beta2
>
>
> In case when Merging object referencing transient instance NHibernate throws error:
> "NHibernate.TransientObjectException : object references an unsaved transient instance - save the transient instance before flushing. Type: Foo, Entity: Foo"
> This is not very helpful in diagnosing the problem as it does not say how the object is referenced.
> A more helpful message would be:
> "NHibernate.TransientObjectException : Property Bar on object Foo is set to a transient object BarImpl- save the transient BarImpl before flushing (or set cascade action for the property to something that would make it autosave). Type: Foo, Entity: Foo"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|