M-Zuber / MyHome

Home finance management
MIT License
24 stars 21 forks source link

The dropdown in DataChartUI shows a category for both transaction types - even though it is only in one #110

Closed M-Zuber closed 8 years ago

M-Zuber commented 8 years ago

I am not sure what layer the code that causes the bug is on... [EDIT] See below as the issue is caused when entering a new transaction

M-Zuber commented 8 years ago

Brain dump on the matter:

Since the categories are called with AsNoTracking, they seem to be treated as new items when saving the transaction.

Before any of this, look if there is a setting for CodeFirst that controls the creation of sub objects


As a precondition, maybe add unique indexes to the appropiate tables - code can be found in VirtualGabbai

First try and see if just removing the AsNoTracking is enough

If that does work, before saving the item, pull the categories from the database and set the properties to be equal to the object that is returned

Last ditch scenario is too revert to having seperate sets of objects.

M-Zuber commented 8 years ago

Per this article the change is to update the non-read actions to use FK properties.