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
|
|
|
|
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?
|
|
|
|
Rank: Newbie
Groups: Registered, Developers Joined: 8/11/2021(UTC) Posts: 6
Thanks: 2 times
|
So I started from scratch and now it works.
|
|
|
|
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.
|
|
|
|
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.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close