diegomvh / angular-odata

Client side OData typescript library for Angular
https://www.npmjs.com/package/angular-odata
MIT License
50 stars 14 forks source link

Issues with guid (latest version) #11

Closed Bonny88 closed 4 years ago

Bonny88 commented 4 years ago

Hi Diego,

I see that you had closed some issues about the same topic, but it seems to me that is still not working as intended. I'll try to explain my scenario:

I have a service created using your automatic generator; the service expose an entity called "books" with a key called "id" of type edm.guid. When i try to get a single element (using either fetchOne or get) the url that the service compose is wrong:

image

image

WIth the help of our old friend, the chrome debugger, i found out that the key is passed to the builder method guid, which converts my string into an object with type "guid" and my value as the parameter "value".

image

image

Then, the method "buildQuery" is invoked, and when the key is checked the components of the object previously created are treated as two separate keys and not as a single key with a type specification:

image

Am i calling the function in the wrong way or is there an effective issue?

Thanks again for your efforts on this library. Luca

diegomvh commented 4 years ago

Hi @Bonny88

Thank you very much for reporting the problem with such good documentation. The fix was already released in version 0.11.2

Regards

Bonny88 commented 4 years ago

Hi Diego,

Thank you for the fast feedback, i can confirm that now all CRUD operations are being composed with the proper key.

Keep up the good work! Luca