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

  • Home
  • SEARCH
  • 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 8225937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:35:11+00:00 2026-06-07T15:35:11+00:00

I have the following model defined in .NET: Public Class Request <Key()> Public Property

  • 0

I have the following model defined in .NET:

 Public Class Request
  <Key()>
  Public Property RequestId As String
  Public Property Description As String
  Public Property InfoCards As List(Of InfoCard)
End Class

Public Class InfoCard
  <Key()>
  Public Property InfocardId As String
  Public Property Description As String
  Public Property RequestId As String
End Class

The ReqeuestId property on the InfoCard is so that EF Code First can generate the db.
I then use the UpshotContext helper to generate the JavaScript model like so:

Html.UpshotContext(bufferChanges:= true) _
  .DataSource(Of UpshotTest.UpshotTest.RequestController)(Function(x) x.GetRequests()) _
  .ClientMapping(Of UpshotTest.Models.Request)("Request") _
  .ClientMapping(Of UpshotTest.Models.InfoCard)("InfoCard")

This generates all models nicely, and when I call refresh on the upshot dataSource, the data is retrieved as expected.

The problem I am facing is when I attempt to modify a property of a child object (e.q. Request.InfoCards(0).Description). Changing that value will trigger the change in the InfoCard, but not in the Request entity. So, calling Request.IsUpdated() will return false, whilst calling Request.InfoCards(0).IsUpdated() will return true.

Does upshot not know how to track changes in child entities? Or is it a problem with the mappings on the client side?
So far I have tried several mappings:

  • mapping all properties manually:

    window.Request = function (initialData) {
        var self = this;
        self.RequestId = ko.observable(initialData.RequestId);
        self.Description = ko.observable(initialData.Description);
        self.InfoCards = ko.observableArray(ko.utils.arrayMap(initialData.InfoCards, function (data) {
           return new window.InfoCard(data);
        }));
    
        upshot.addEntityProperties(self, "Request:#UpshotTest.Models");
    };
    
  • using upshot.map:

    window.Request = function (initialData) {
        var self = this;
        upshot.map(initialData, upshot.type(Request), self);
    };
    
  • defining my own map function and passing it to upshot:

    window.Request = function (initialData) {
        var self = this;
        upshot.observability.configuration.map(initialData, upshot.type(Request), map, self);
    };
    

The mappings seem correct with all approaches, except the parent entity is not aware of modifications done in its children. Is child tracking even possible?

  • 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-06-07T15:35:12+00:00Added an answer on June 7, 2026 at 3:35 pm

    Okay, I found the issue in the end. As it turns out, this behavior was reproducible when a hierarchy of 3 nested entities existed (i.e. Request -> InfoCard -> InfoField. Modifying a value of the InfoField did not reflect in the parent entity.

    After many hours of upshot debugging, I found the culprit to be the _addTrackingRecursive method in upshot.js. Replacing the obs.track(obj, this._getTracker(), this._entityType); call to obs.track(obj, this._getTracker(), type); solved the nested change tracking issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following data model class defined: @PersistenceCapable public class TestSerializableModelObj { @Persistent(serialized=true,
All, i have the following model defined, class header(models.Model): title = models.CharField(max_length = 255)
I have the following model: public class Contact { public Contact() { Name =
I have the following model: public class Tag { public int Id { get;
I have the following Model pattern: public abstract class PARENTCLASS {...} public class CHILD_A_CLASS
Consider I have defined the following models: class Tag(models.Model): name = models.CharField(max_length=20) class Entry(models.Model):
I have following model class in my application: public class Dispute { public long
I have a model defined as public class Department { [ScaffoldColumn(false)] public object Id
I have the following model structure: class Container(models.Model): pass class Generic(models.Model): name = models.CharacterField(unique=True)
I have the following model and instance: class Bashable(models.Model): name = models.CharField(max_length=100) >>> foo

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.