Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3441204
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:31:28+00:00 2026-05-18T08:31:28+00:00

I have an entity CustomerActivityReport which I’m trying to submit to the server via

  • 0

I have an entity CustomerActivityReport which I’m trying to submit to the server via WCF. On the server end I’m using the repository + UOW patterns to update/insert the entity into the db.

CustomerActivityReport has a many to many relationship to another entity LookupValue. When I try and submit an instance of CustomerActivityReport, the DataContractSerializer throws the error: “Object graph for type ‘FixupCollection[CustomerActivityReport]’ contains cycles and cannot be serialized if reference tracking is disabled”. I am getting this error even when I don’t set the relationship on the LookupValue entities.

To get around this I’ve tried applying [DataContract(IsReference = true)] to both the entities in question and also to FixupCollection. But then I get different problems.

Has anybody else run into similar problems when trying to submit related entities over WCF?

Thanks in advance for any replies.

Ryan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:31:29+00:00Added an answer on May 18, 2026 at 8:31 am

    I couldn’t get this working with FixupCollection, and so I’ve had to submit all my entity collections as standard Collection, and then add logic server end to change them back into FixupCollection.

    Client:

    convertedCustomerActivityReport.LookupValues = new Collection<LookupValue>()
    

    Server:

    public virtual ICollection<LookupValue> LookupValues
        {
            get
            {
                if (_lookupValues == null || _lookupValues is Array)
                {
                    var newCollection = new FixupCollection<LookupValue>();
                    newCollection.CollectionChanged += FixupLookupValues;
                    newCollection.AddRange(_lookupValues);
                    _lookupValues = newCollection;
                }
                return _lookupValues;
            }
    

    I’ve also added an AddRange method to FixupCollection:

     /// <summary>
        /// Adds multiple items.
        /// </summary>
        /// <param name="items">The items to add.</param>
        public void AddRange(IEnumerable<T> items)
        {
            if (items == null)
            {
                return;
            }
    
            foreach (var item in items)
            {
                this.Add(item);
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Entity Framework entities Events which have an EntityCollection of RSVP. I want
I have entity model like this (using EclipseLink and JPA 2.0): @Entity class A
I have entity e.g. Product which aggregates other entities such as Category . Those
I have an entity that maps to an external oracle table which is one
I have an entity loaded by Hibernate (via EntityManager ): User u = em.load(User.class,
suppose i have @Entity A, which has an eager @ManyToOne to @Entity B, and
I am trying to test some DAOs. I have Entity (and table) named Nomination
I'm trying to implement change password functionality in Symfony 2 project. I have entity
When I have entity B inherit from entity A using table-per-type for storage and
I have Entity Data Model using ADO.NET Entity Data Model (using auto generate from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.