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 9098871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:28:10+00:00 2026-06-17T00:28:10+00:00

I’m using breeze.js in a SPA and have problem with entities loaded from server.

  • 0

I’m using breeze.js in a SPA and have problem with entities loaded from server. Namely, entity created from metadata (using metadataEntityType.createEntity()) and added to entity manager has all of the properties like server-side model, ready for binding with knockout, and that is cool.

The problem is when I use entityModel.EntityQuery.from("WorkOrders"), the successCallback that I pass to its .then promise gets a data object with results property which contains an array of vanilla js objects where all of the properties with value == null are missing (this is exactly how server sends that data through the wire, but I suppose that it is how is meant to be because breeze has all metadata on the client and does not need all properties to know that they exist).

I have my custom constructor which can make full-fledged knockout object like the one from createEntity(), but I’m thinking that there must be a better way to let breeze handle this for me automatically. I’m not sure if I should add these objects to entity manager as I suppose they should be already there, and I registered my custom constructor to store using entityManager.metadataStore.registerEntityTypeCtor, but that does not change what success callback gets, it is always plain JSON just like it was sent from server.

Update: Code of method which is called on the server to return json payload is

[HttpGet]
public IQueryable<WorkOrder> WorkOrders()
{
    return (IQueryable<WorkOrder>)_contextProvider.Context.WorkOrders;
}

As @Jay pointed in its answer & comment, that may be the cause of behavior. This is the JSON payload returned:

[{"$id":"1","$type":"WorkOrders.Domain.Models.WorkOrder, WorkOrders.Domain","Approved":false,"DateModified":"2013-01-02T22:31:20.897","RequestForEstimate":false,"Id":5}]
  • 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-17T00:28:12+00:00Added an answer on June 17, 2026 at 12:28 am

    This issue was caused by a model being in a different namespace than the DbContext/ObjectContext that hosted it. Previously this was documented as a known limitation.

    As of v 0.83.2, breeze now allows model namespaces to be different from the DbContext/ObjectContext namespace.

    Please confirm if this fixes the issue.

    Thanks

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

Sidebar

Related Questions

I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a text area in my form which accepts all possible characters from
I have been unable to fix a problem with Java Unicode and encoding. The
I have thousands of HTML files to process using Groovy/Java and I need to
I have a view passing on information from a database: def serve_article(request, id): served_article
I have a bunch of posts stored in text files formatted in yaml/textile (from
I am using jsonparser to parse data and images obtained from json response. When
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am currently running into a problem where an element is coming back 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.