Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Automatically Generated ExtJS Requests with _id #246

Closed
bob-obringer opened this issue Jul 12, 2017 · 1 comment
Closed

Handle Automatically Generated ExtJS Requests with _id #246

bob-obringer opened this issue Jul 12, 2017 · 1 comment

Comments

@bob-obringer
Copy link

bob-obringer commented Jul 12, 2017

In some cases, ExtJS automatically generates URLs that contain a reference to a foreign key with _id instead of the entity name.

For example,

In Ext, If you have a Person model that contains a collection of Appointments, the Appointments collection can be loaded on demand if not initially loaded inline with the Person record such as in the following example:
Person.promiseToLoad(12345).then(person => person.appointments().load())

ExtJS automatically generates a request with the following filter parameter:
[{"property":"person_id","value":12345,"exactMatch":true}]

LinkRest responds with the following exception (and partial stack):
c.n.l.r.LinkRestException: Invalid path 'person_id' for 'Appointment' at c.n.l.r.runtime.parser.cache.EntityPathCache.lastPathComponent(EntityPathCache.java:150) at c.n.l.r.runtime.parser.cache.EntityPathCache.getPathDescriptor(EntityPathCache.java:65) at c.n.l.r.runtime.parser.cache.PathCache.getPathDescriptor(PathCache.java:23) at c.n.l.r.runtime.adapter.sencha.SenchaFilterProcessor.process(SenchaFilterProcessor.java:126) at c.n.l.r.runtime.adapter.sencha.SenchaRequestParser.parseFilter(SenchaRequestParser.java:53) at c.n.l.r.runtime.adapter.sencha.SenchaRequestParser.parseSelect(SenchaRequestParser.java:43) at c.n.l.r.runtime.processor.select.ParseSelectRequestStage.doExecute(ParseSelectRequestStage.java:37) at c.n.l.r.runtime.processor.select.ParseSelectRequestStage.doExecute(ParseSelectRequestStage.java:16) at c.n.l.r.processor.BaseLinearProcessingStage.execute(BaseLinearProcessingStage.java:20) at c.n.l.r.processor.ChainProcessor.execute(ChainProcessor.java:18) at c.n.l.r.processor.ChainProcessor.execute(ChainProcessor.java:22) at c.n.l.r.runtime.DefaultSelectBuilder.get(DefaultSelectBuilder.java:204) at c.n.l.r.SelectBuilder.select(SelectBuilder.java:181)

At least within the Sencha adapter, I think LinkRest should be able to consume these automatically generated ExtJS requests.

@andrus
Copy link
Contributor

andrus commented Jun 24, 2023

Closing , as we dropped support for Sencha/Extjs some time ago

@andrus andrus closed this as completed Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants