breeze

Breeze Offline Mode Issues

二次信任 提交于 2020-01-14 03:11:12
问题 UPDATE: Here is a plnkr to illustrate the problem http://plnkr.co/edit/bwQL3o?p=preview Scenario in offline mode You create an entity and store it in the localstorage Breeze generates a tempKey: EmployeeId: -1 and populates a tempKeys array with the EmployeeId: -1 . Every thing is all good and great. Later on, (the application was terminated the device was turned off...) you import the stored data and create a new entity. So Breeze loads the stored data sees the TempKeys of EmployeeId: -1 and

How to use Breeze with Generic Unit of Work and Repositories?

£可爱£侵袭症+ 提交于 2020-01-13 17:02:31
问题 Using this: https://genericunitofworkandrepositories.codeplex.com/ and the following set of blog posts: http://blog.longle.net/2013/05/11/genericizing-the-unit-of-work-pattern-repository-pattern-with-entity-framework-in-mvc/ We are trying to use those repositories with Breeze since it handles client side javascript and OData very well. I was wondering how we could use these with Breeze to handle overriding the BeforeSaveEntity correctly. We have quite a bit of business logic that needs to

Breeze: When child entities have been deleted by someone else, they still appear after reloading the parent

非 Y 不嫁゛ 提交于 2020-01-12 10:00:20
问题 We have a breeze client solution in which we show parent entities with lists of their children. We do hard deletes on some child entities. Now when the user is the one doing the deletes, there is no problem, but when someone else does, there seems to be no way to invalidate the children already loaded in cache. We do a new query with the parent and expanding to children, but breeze attaches all the other children it has already heard of, even if the database did not return them. My question:

How to handle authorization with Breeze JS?

旧时模样 提交于 2020-01-11 09:43:08
问题 Currently my app looks at router parameter and logged in user (Principal.Identity) to authorize access to certain resources (e.g: Add student to your class [identity + class id]). However, If I'm not wrong, breeze js support just one bulk save. It seems to be that I will have to open each and every data and run through the validation/authorization. That is fine, but what I may lose is nice separation of cross cutting concern out side my business logic (as a message handler) (finding what

Breeze create entity from existing one

房东的猫 提交于 2020-01-11 06:05:10
问题 I've been pounding my head for a few days now. Imagine you have a car sales management application. You sell different models. Your Car model has 50 properties. Just for the example, let's say that you want to sell Bugatti Veyron. Now, you just received 5 of those cars. So, I log in to my application, create first Bugatti Veyron with specific ID. Then I want to add 2nd one, but there is a problem - I would have to write down all of those properties again! I'd like to have a Copy button and I

Breeze.js parsing XHR.responseText

牧云@^-^@ 提交于 2020-01-07 06:40:32
问题 Since upgrading from 1.1.3 to 1.4.2 I've been getting uncaught JS errors when Breeze tries to parse responseText that is in HTML format, not JSON. In version 1.1.3, the code is wrapped in a try/catch, which catches the parsing error. The error is thrown on "JSON.parse(XHR.responseText)". But since it's caught, this works great. The error message is bubbled up to the caller. var err = new Error(); err.XHR = XHR; err.message = XHR.statusText; err.responseText = XHR.responseText; err.status =

1.2.1 unmapped properties shouldn't be serialized [closed]

ⅰ亾dé卋堺 提交于 2020-01-07 06:29:45
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Not sure if it is a bug, but: When you have extended type with observable it is also serialized in saveChanges . This makes EFContextProvider to fail on deleting entities. Example of json sent: {"entities": [{ "Id":1015, "Key":"3", "Value":"2", "undefined":"", "entityAspect":{ "entityTypeName":"Setting:#Settings

Sync BreezeJS managers || Broadcast BreezeJS changes

狂风中的少年 提交于 2020-01-06 13:56:52
问题 When BreezeJS persists changes, it passes the changes to a method like this in the WebAPI controller: [HttpPost] public SaveResult SaveChanges(JObject saveBundle) { SaveResult result = _contextProvider.SaveChanges(saveBundle); return result; } Does there exist a method which could handle a transformed version of the "result" variable above from the server, such that it could be used to synchronize other EntityManagers? Much like how Firebase, CouchDB, Derby or a handful of others have

Preventing breeze.js from creating observables properties on array objects

旧巷老猫 提交于 2020-01-06 13:55:56
问题 I must be missing something simple, but can't figure it out. I'm retrieving a bunch of lookup tables in 1 Web API call. return EntityQuery.from('Lookups') .noTracking(true) .using(manager).execute() .then(processLookups); In processLookups I'm calling getLocal for each array that was returned. Example: State table datacontext.lookups = { state: getLocal('States', orderBy.state, true), .... } function getLocal(resource, ordering, includeNullos) { var query = EntityQuery.from(resource) .orderBy

Breeze 1-To-Many Unidirectional Navigation Property not Populated

血红的双手。 提交于 2020-01-06 13:04:31
问题 Breeze Version: 1.5.3 I'm experiencing something similiar to some older questions on SO but it seems like this "bug" is reoccurring: I have a 1-To-Many unidirectional navigation property which is not populated. I have checked the metadata and the response from the server. I've even debugged into breeze and the node (or rawEntity) seems to be perfect. I've tried to track it down and came to the conclusion, that it happens, because no "inverse"-Property is found for my Navigation Property and