breeze

Validation errors when saving

拟墨画扇 提交于 2019-12-11 02:08:23
问题 When saving using SaveChanges() using Breeze, I get an error when doing a simple update if I have required fields. E.g. I have a table of users with a Name , and Email fields where the Email field is not required. I can display the list of user names (but do not want to display the emails). The display works, but save never gets called - I get a validation error in JavaScript: Not saved due to validation error: 'email' is required But surely this should be just generating a simple update on

containerless statements of knockoutjs is not working in hottowel SPA?

无人久伴 提交于 2019-12-10 23:48:50
问题 I was trying to use the containerless statements like <!--ko if:IsShowData==true --> of knockoutjs in hot towel template but it was not woring instead if i use visible binding with some element like div then it work very fine.( <div data-bind="visible: IsShowData==true"></div> ) Can anybody tell me if containerless statements of knockoutjs doesnt work in hot towel template? In Default Hot towel template i added few lines in home.html and home.js as follow: views/home.html <section> <h2 class=

breeze: behavior of setDeleted

大兔子大兔子 提交于 2019-12-10 23:32:58
问题 I have a grid which shows a list of entities. Each row has a delete button. Once the user clicked on the delete button for a given entity I want to change the css of the row and to replace the delete button with a cancel button. So on the delete button event handler, I do : myEntity.entityAspect.setDeleted(); But as soon as I do that, the entity is removed from the collection and the row disappear from the grid. Is there a way to prevent that ? I just want to mark the entity as 'deleted', and

How can I add context metadata to my entities without using EF?

江枫思渺然 提交于 2019-12-10 22:37:54
问题 I have to implement an architecture where, unfortunately, we are using SharePoint 2013 as, effectively, our principle database. (Not my choice, in case you hadn't picked that up). I have an Asp.Net MVC facade application on the server, handling composition of data from SP and a couple of other data sources, and then a JavaScript SPA as client. An additional wrinkle is that the client needs to be able to work offline, so I need to use IndexedDB to store the data for offline access. This seems

Breeze does not generate ko observables

爷,独闯天下 提交于 2019-12-10 20:19:14
问题 I have the following problem with a simple MVC4 + ko + breeze webapp: the breeze entities returned by a query are simple javascript objects, without ko observables. I inspected the todo sample (which correctly returnes ko observables) and I didn't find the place where breeze is configured to work with ko (and generate observables). I tried adding the following lines, but nothing changed: var core = breeze.core; var entityModel = breeze.entityModel; core.config.setProperties({

breeze fetch meta data if not present

烈酒焚心 提交于 2019-12-10 19:17:41
问题 I have an angular / breeze / webapi app which works great except if I refresh a page which has a EntityQuery to return one entity. It then complains that the metadata is not available as the entityquery does not trigger a metadata fetch, unlike a standard query. If we have reached the page from a previous angular page which has fired a standard breeze query then the metadata is already there and we have no problem. So question is, how do I check the metadata exists and trigger the metadata

Breeze manage NODB EntityTypes with DB EntityTypes

柔情痞子 提交于 2019-12-10 17:28:42
问题 i´m using the Papa's course CCJS code to investigate Breeze.js and SPA. Using this code i´m trying to manage aditional information that cames from server but that is not an Entity contained in the Metadata that cames from EntityFramework. So i created a NO-DB class called Esto and a Server method like Lookups: [HttpGet] public object Informacion() { var a = new Esto(....); var b = new Esto(.....); var c = new Esto(......); return new {a,b,c}; } then in model.js inside configureMetadataStore i

Breeze Expand not working on WebAPI with EF

二次信任 提交于 2019-12-10 17:07:41
问题 I have published a WebAPI service which returns a list of items. I am implementing Breeze and have managed to get it basically working with filtering/sorting. However, the Expand is not working. http://www.ftter.com/desktopmodules/framework/api/dare/dares?$expand=ToUser You can see the ToUserId ForeignKey in the response above, but the ToUser properties are NULL (the user definitely exists) You can see the ToUser EF navigation property in the metadata. When I use .Include on the server side I

BreezeJS entityManagerFactory Unknown Provider ASP.NET

给你一囗甜甜゛ 提交于 2019-12-10 15:24:33
问题 I am injecting the entityManagerFactory into Angular but I am getting an error. This is being done in the datacontext module just like John Papa's example. The error is unknown provider. I am including the entityManagerFactory.js file in the index.html file but no success. Any ideas? function () { 'use strict'; var serviceId = 'datacontext'; angular.module('app').factory(serviceId, ['common', 'entityManagerFactory', 'breeze', 'logger', datacontext]); function datacontext(common) { var $q =

Setting AJAX headers in Breeze

倖福魔咒の 提交于 2019-12-10 13:53:30
问题 How do I set headers before letting breeze make a request? Example: my service expects a certain key to be part of the request in a header name 'x-service-key'. Till now, I was using jquery ajax and amplify, so pretty easy to set up the header. Since I don't have any control over the request that breeze is making, how do I pass extra stuff like headers? This question was posted by sujesharukil on our IdeaBlade forums. I am reposting the question and answer here since I think it will be useful