ellizio / odata-cli-ui

Rider plugin that provides UI to generate OData Reference using OData CLI
MIT License
2 stars 0 forks source link

Types don't implement INotifyPropertyChanged? #25

Closed dazinator closed 1 week ago

dazinator commented 2 months ago

Tried to use this (and thank you for publishing this as it looks very useful). Was able to generate the code, and create a test

This fails at runtime

 client.SaveChanges(SaveChangesOptions.PostOnlySetProperties | SaveChangesOptions.BatchWithSingleChangeset);

System.InvalidOperationException An attempt to track an entity or complex type failed because the entity or complex type 'Microsoft.Dynamics.DataEntities.LedgerJournalLine' does not implement the INotifyPropertyChanged interface. at Microsoft.OData.Client.DataServiceCollection`1.InsertItem(Int32 index, T item)

dazinator commented 2 months ago

I didn't see any option to have types implement INotifyPropertyChanged This option is available for example when using VS's add odata service reference

ellizio commented 1 month ago

@dazinator thanks for the feedback! It seems i missed enable-tracking command line option.

Can you manually add --enable-tracking to command from OData CLI UI tool window and check generation result?

ellizio commented 2 weeks ago

@dazinator new version 1.2.0 provides --enable-tracking option https://plugins.jetbrains.com/plugin/24117-odata-cli-ui/edit/versions/stable/591661 https://github.com/ellizio/odata-cli-ui/releases/tag/1.2.0-2024.2