single page application - Breeze: Track changes on new object -


I'm able to set up a unit object, set some default values ​​and add it to the manager. Now I manager. I want to track its changes using hasChanges () . For some reason, it always gives the truth whether even newly created institutions should check in the database, but should I check anything else?

As soon as you add it to 'EntityManager' by definition, it has changed because It is in an 'added' state. To handover the 'His Change', it means that it is necessary to be saved because it is 'different' from what is provided in your heartstep service (which is not yet 'saved' in this case).

What you can do is attach your unit to EntityManager in the 'unchanged' state.

myEntityManager.attachEntity (newNTT, air .nettext has been replaced);

In this case, any change you make will do the job you want, but ...

Bridge Now your new attached unit And if you try to save it, then saving will fail because the wind will try to 'modify' the permanent unit rather than make a new one.

If you really want to complete your request, you have to use 'Enclosed', but these institutions will also have to keep track of them and add them before adding them.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -