Code Monkey home page Code Monkey logo

Comments (3)

diegomvh avatar diegomvh commented on May 28, 2024 1

Hi David

Yes, by schema I mean the source code generated by ODataApiGen and include it in the main angular module as part of your project. In theory, if you insert the services generated from this module, they have a text string that defines the parser for the entity handled by the service.

In the example project there are several APIs included in the main module that exemplify this.
The generator generates two main components to include in the root module the config and the module

One thing does not imply the other :),
I think also the base services for entities needed some work, at least to remove the ambiguity between entity and key.

Change their behavior by making the update, patch and destroy signatures wait to receive the key and reserve for the save shortcut some of what I would expect to get if I have schema associated with the entity handled by the service.

These days I see how the library behaves with the project where it fulfills its function :)
And after being tested in production :O i release the new version.

Regards

from angular-odata.

diegomvh avatar diegomvh commented on May 28, 2024

hi David

I am reviewing the functionality of the services based on the problem you reported, there are several things to improve.
The library has to work with or without an associated schema; a vice of my way of working is neglecting the code when there is no schema ...
For example: when an update (PUT), an assign (PATCH) or a destroy (DELETE) is made ... if there is a schema, the key of the entity is resolved based on it ... and since in the case from your example the key is the UserName (but you shouldn't be using an associated schema right?)
After seeing the code ... I think it is very feasible to improve the services to work without a schema.

I see to solve it these days ...
There are other similar problems reported and even users asking for some documentation regarding the entity modification functions.

Thanks and regards
Diego

from angular-odata.

DavidEgresits avatar DavidEgresits commented on May 28, 2024

Hi Diego,

Thanks for the quick response, I saw that you already submitted a fix. Pretty fast! :)

To be honest, I'm not really sure how what you mean under using it with schema... I generated the OData classes with your ODataApiGen based on the metadata, so I assumed it is using the schema. What can I do to work with the schema?

Thanks and Best regards,
David

from angular-odata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.