logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
mbartens26403835  
#1 Posted : Wednesday, March 2, 2022 9:46:47 AM(UTC)
mbartens26403835

Rank: Newbie

Groups: Registered, Developers
Joined: 8/11/2021(UTC)
Posts: 6

Thanks: 2 times
Update: So I was able to get the belowto work after starting with a fresh copy of the cart. Now I am adding a column to subscriptions and I am getting the error: "NHibernate.MappingException: 'Association references unmapped class: CommerceBuilder.CMS.ChangesetZone'"

I already removed the column I added to ac_Subscriptions and the associated code. In visual studio I rebuild the solution and then when I run the website I get that error. Help!


Hi,
Several years ago I created a custom solution using AbleComm for a client using who needed the site to be set up so that users could purchase memberships to the site. The code that I wrote mostly used subscriptions code.


Now I have another client with the same needs. We purchased the cart and source and I started to add the customizations. The first thing I needed to do is add a column to ac_Groups.

Here are the steps that I took:
In SQL I added the column:
Code:
ALTER TABLE ac_Groups ADD IsMembership BIT NOT NULL DEFAULT 0 
GO
UPDATE dbo.ac_Groups SET IsMembership = 0
GO


I added this line to CommerceBuilder\Users\Group.hbm.xml
Code:
		<property column="IsMembership" name="IsMembership" not-null="true" type="Boolean"/>


I added this to CommerceBuilder\Users\Group.Generated.cs
Code:
        /// <summary>
        /// Gets or sets a value indicating whether IsMembership
        /// </summary>
        public virtual bool IsMembership { get; set; }


I'm getting this error. What am I doing wrong? TIA!!
Code:
2022-03-02 10:06:17,374 ERROR te.Cfg.Configuration CommerceBuilder.Users.Group.hbm.xml(5,4): XML validation error: The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'bag' in namespace 'urn:nhibernate-mapping-2.2'. List of possible elements expected: 'meta, subselect, cache, synchronize, comment, tuplizer, id, composite-id' in namespace 'urn:nhibernate-mapping-2.2'.
NHibernate.MappingException: CommerceBuilder.Users.Group.hbm.xml(5,4): XML validation error: The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'bag' in namespace 'urn:nhibernate-mapping-2.2'. List of possible elements expected: 'meta, subselect, cache, synchronize, comment, tuplizer, id, composite-id' in namespace 'urn:nhibernate-mapping-2.2'. ---> System.Xml.Schema.XmlSchemaValidationException: The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'bag' in namespace 'urn:nhibernate-mapping-2.2'. List of possible elements expected: 'meta, subselect, cache, synchronize, comment, tuplizer, id, composite-id' in namespace 'urn:nhibernate-mapping-2.2'.
   --- End of inner exception stack trace ---
2022-03-02 10:06:17,386 ERROR te.Cfg.Configuration Problem parsing configuration

Edited by user Wednesday, March 2, 2022 1:22:41 PM(UTC)  | Reason: New Error

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

mazhar  
#2 Posted : Wednesday, March 2, 2022 10:27:34 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
Code:

<property column="IsReadOnly" name="IsReadOnly" not-null="true" type="Boolean"/>


Shouldn't you be using the IsMembership instead of IsReadOnly in column and name attributes of HBM file?
mbartens26403835  
#3 Posted : Wednesday, March 2, 2022 11:25:42 AM(UTC)
mbartens26403835

Rank: Newbie

Groups: Registered, Developers
Joined: 8/11/2021(UTC)
Posts: 6

Thanks: 2 times
So I started from scratch and now it works.
susan26472918  
#4 Posted : Friday, March 4, 2022 7:01:34 AM(UTC)
susan26472918

Rank: Newbie

Groups: Authorized User
Joined: 3/2/2022(UTC)
Posts: 0

I have found out what has been causing my troubles. I have been using Beyond Compare to compare the code, move over snippets and files and that seems to be what was causing the problem.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.