Using Breeze 0.73.3. Modeling my app based on John Papa's Breeze version of Code Camper - http://www.johnpapa.net/recent-presentation-on-spa-basics/. There seems to be a problem with manager.hasChanges. Manager.rejectChanges() publishes hasChanges to false. Manager.saveChanges() does not publish any changes to hasChanges. Of course, it should be published to false following a successful save.
Good catch! This is now fixed in v 0.73.6 available via nuget or the breeze website.
Related
So I'm working on a project which has been published to users. Before I put my hand on this project, this project has an 1.0 and an 2.0 version, v2.0 modified the data model of core data, but the one who did this didn't add a new version to data model.
So when user upgrade from v1.0 to v2.0, it will crash.
My problem is now I'm deploying v3.0, how do I modify my xcdatamodel so that user with v1.0 and v2.0 can both upgrade to v3.0 without problem?
Get the V1 model and add a new version to it that is identical to v2 and then add another V3 model to that so that you end up with a model that has all three versions. That way you should be able to use lightweight migration from either of the previous versions, assuming that your model changes will in fact support lightweight migration. If not then do a manual migration as suggested by #Mundi. You can recover the V1 model from the V1 app bundle if you no longer have the source code but you do need a copy of the V1 app bundle to do so. You might have to google for how to do this or let me know and I will hunt around as I will have it documented somewhere... Hope this helps.
The only feasible solution that comes to mind seems to be to include two data models in the bundle. (Essentially, the versioning system does something similar.)
Read the data with the first model, then "manually" copy it to the data store of the second model (modifying it as necessary). From then on, only use the second model (which should be versioned for future changes).
I would block the UI and put up a message like "migrating your data" to make sure no user interaction interferes with this process.
I have searched for days with no solution in sight.
I need multiple Chromium instances in one single application and each of this instance logins to the same site with different account (ex: outlook.com).
I tried this solution but there's no "OnGetCookieManager" event in DECF3 new version. Apparently there was a related bug and event onGetCookieManager was removed in the 1547 CEF3.
I tried this but it doesn't work too.
Is this really possible? How?
I'm using DCEF3 (revision: 0cc175e7a629) and Delphi XE3.
Here's what CEF3 maintainer told me:
"Cookies can be stored globally, per request context or something else entirely. It depends on whether you pass a CefRequestContext to CreateBrowser*() and what you return from CefRequestContextHandler::GetCookieManager."
I'm not entirely sure how CreateBrowser is exposed in Delphi (I only use the C++ API), but I can confirm that GetCookieManager still exists in trunk (as the only method of CefRequestContextHandler).
I have been developing an application in Visual Studio Lightswitch (Silverlight client in VS2010 SP1 if it makes any difference), and so far have done all the database development in the Lightswitch designer.
I now want to use an external database, but don't want to recreate the whole app, or even just the screens. I have scripted the database, and have created a copy in SQL Server, but can't find out how to get Lightswitch to use this external database without starting the whole thing again.
Is there a simple way to change the connection string so that I can carry on from where I am, but have Lightswitch point at the external database instead of the internal one?
Turns out this is a very difficult thing to do. Super Lightswitch-hacker David Baker saw a post I'd made on the subject in the MSDN Lightswitch forum, and kindly offered to have a go at it for me. It took him several goes, but we got there in the end.
I wouldn't recommend this to anyone. I would strongly recommend using an external database right from the start. I can't see much benefit from using the internal one, and if you ever need more control over it, or want to switch to an external one, you've got major problems.
Hope this helps someone.
You must publish your project in order to create a new SQL database , publishing your project will create DB scripts for your new DB , don't use the internal LS DB to create script for your new DB.
So, we are using TFS 2012 RC and have modified the work flow a bit for a regular task item by adding a few custom transition states.
When updating tasks though Visual Studio 2012 RC, everything works fine. I can move through all the states without any problems. However, when updating the task through TFS Portal, either by dragging the item on the board or opening the form and changing the state using the pulldown, I get the following error: "TF237165: Team Foundation could not update the work item because of a validation error on the server. This may happen because the work item type has been modified or destroyed, or you do not have permission to update the work item."
This ONLY happens, however, when moving to the Done state and nothing else. All other states work fine.
So, I'm not sure what that means since it works fine in Visual Studio. What would be helpful if I could see the exception or more information somewhere, but I don't know where these validation errors are stored.
Any help would be greatly appreciated!
The issue was with the work flow. The transition was setting a field that was conflicting with the state also changing the same field.
In my case there was another issue.
The problem was that the field had a trailing \r\n in the data being sent down by the server. I believe the client javascript OM was removing this which makes the field dirty even though it’s read only.
Workaround was to make the field read-write instead of read-only. Then I set back it to read-only - and now it works.
Micrsoft promised they may fix it in next release.
In my case, on TFS 2013 U5 I had changed my TFS Profile DisplayName so that it did not match my ActiveDirectory DisplayName. I could not edit or create anything until I changed the DisplayName back.
I am looking to create an "undo" mechanism for a TFS work item using the TFS API - this will undo committed changes. Basically, after saving new data (also using the API) to the work item, I would like the option to revert the WorkItem back to the previous version.
Pseudo code something like this...
1)Get current Work Item for Id:xxxxxx
2)Get "revision id" of this latest
work item and store in "PreviousRevId"
3)Modify field values
4)Save
5)For
whatever reason we don't want these changes any more (domain logic as
to reasons are excluded for brevity)
6)Revert to old revision
("PreviousRevId") and make it the current (latest) revision
Have a look at the Work Item History Visualizer i created. By taking the work item Id, you can pull out the history of all work item fields.
http://geekswithblogs.net/TarunArora/archive/2011/08/21/tfs-sdk-work-item-history-visualizer-using-tfs-api.aspx
But this will only help you get the information, rest you'll have to build your own control to build the revert functionality.
EDIT: Also worth checking this visual studio extension **
http://visualstudiogallery.msdn.microsoft.com/d127b275-b7b6-4504-b01e-58b4a010ff53
This lets you see the work item as it was on the historic date. Giving you the baseline affect you are after. HTH
I don't think this could be achieved by SDK, you can do this against the DB directly but this is of course not recommended at all, anyway the main 2 tables to hold work items are WorkItemsWere and WorkItemsLates see the following:
There is no automatic way to revert, but it's an easy foreach loop to iterate through the fields to update them to the previous value. You also have to worry about links and attachments.