Gold R6 Transient or Detached error in App.Log

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Gold R6 Transient or Detached error in App.Log

Post by AbleMods » Wed Apr 02, 2014 7:04 pm

Gold R6 app.log file is showing hundreds of this error:
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.
Is this bad? Good? Can be ignored?
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

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Gold R6 Transient or Detached error in App.Log

Post by ForumsAdmin » Thu Apr 03, 2014 1:59 am

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.

Post Reply