Is this bad? Good? Can be ignored?2014-04-02 22:10:48,173 WARN e.Engine.ForeignKeys Unable to determine if CommerceBuilder.Users.UserGroup with assigned identifier CommerceBuilder.Users.UserGroupKey is transient or detached; querying the database. Use explicit Save() or Update() in session to prevent this.
Gold R6 Transient or Detached error in App.Log
Gold R6 Transient or Detached error in App.Log
Gold R6 app.log file is showing hundreds of this error:
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
- ForumsAdmin
- AbleCommerce Moderator
- Posts: 399
- Joined: Wed Mar 13, 2013 7:19 am
Re: Gold R6 Transient or Detached error in App.Log
The short answer is - It can be ignored.
The long answer is that NHibernate does not like composite keys. In fact use of composite keys is discouraged in object relational mapping frameworks. When there are composite keys in use NHibernate can not easily determine which associated objects are to be saved when an entity is saved and therefore it may make additional calls to the database.
The recommended solution is to eliminate the composite keys and make use of identity keys. We do have an improvement logged in our bug database for this purpose. However since this kind of change is not easy to make especially taking into consideration the impact on upgrades, we have so far kept this improvement unscheduled for a near future release.
The long answer is that NHibernate does not like composite keys. In fact use of composite keys is discouraged in object relational mapping frameworks. When there are composite keys in use NHibernate can not easily determine which associated objects are to be saved when an entity is saved and therefore it may make additional calls to the database.
The recommended solution is to eliminate the composite keys and make use of identity keys. We do have an improvement logged in our bug database for this purpose. However since this kind of change is not easy to make especially taking into consideration the impact on upgrades, we have so far kept this improvement unscheduled for a near future release.