Comments (13)
Thanks for reporting this.
Can you help us narrow down what got broken by comparing both requests (working single-expansion and broken set-expansion) and figuring out where they start behaving differently from your expectation?
from podata.
Here an example of output for a service with this definition: Metadata.txt
Entity type "Tabela" (entity set "Tabelas") has 2 navigation properties "Campos" and "CamposChave" leading to collections of entity "Campo".
-
Requesting a single entry of "Tabelas" with expansion of "CamposChave"
odata.svc/Tabelas('S_Anexos')?$expand=CamposChave
results in this output: SingleExpansion.txt
Element "link" opened on line 11 and closed on line 77 contains the "m.inline" with expansion of "CamposChave". As no expansion of "Campos" was requested, the "link" element for "Campos" (line 10) has no inline. -
Requesting the collection of "Tabelas" with expansion of "CamposChave"
odata.svc/Tabelas?$expand=CamposChave
should result in this output (as it was before version 0.3.0): SetExpansion_OK.txt
For each entry the "link" element for "CamposChave" have the inline and "Campos" have no inline. -
But after version 0.3.0 the result is like this: SetExpansion_NOK.txt
On each entry both "link" elements for "Campos" and "CamposChave" have no inline content.
from podata.
G'day bud, I have been working through your issue today which is quite a hard hitter. We are still chasing it down. but i just wanted to seek some information. with relation to the data in the expanded values (the CamposChave) was there any language specific bits (umlaut, accents, etc) that got trimmed from the outputted data or the saved txt file? because we thing this issue might be character set related.
But you will be happy to know we can reproduce it and are working on it
from podata.
I have checked my examples, the one I send you, and others I have, and did not found any language specific character set.
But in my debug trace I see a difference in the calls being done to my query provider functions.
In version 0.2.0 the sequence of calls was:
- one single call to getResourceSet
- multiple calls to getRelatedResourceSet, one for each entry, and in parameter $sourceEntityInstance I receive one instance of my resource class
In current version the sequence is different:
- one single call to getResourceSet
- one single call to getRelatedResourceSet, and in parameter $sourceEntityInstance, now one instance of POData\Providers\Query\QueryResult, containing the collection of my resource class instances in property "results"
I assume this is not an intended change, even if from performance POV it could be good to have my function for the expand returning all the results for all entries, this would only work if the target type of the navigation contains all the keys from the source plus one more at least. But OData definition does not impose this pure relational scheme (which is good).
from podata.
You are correct, it was not an intended change. and it defiantly narrows down the search space. we should be able to get ontop of it for you.
On a side note, what tool did you use to generate and analyze the debug trace?
from podata.
No special tool, what I call the debug trace is just a log file. I have my own-made framework (kind of old, but still working for me) which I use to build PHP apps and the debug log is one of the functions.
from podata.
@cdcampos, @c-harris , I've come up with a fairly minimal test case for the aspect of this bug that I'm seeing at my end of things (trying to expand an entry property, not a feed). What I'm seeing now is intermittent inline failure (first inlined model displays well enough, but nothing later), but the same pattern of getResourceSet / getRelatedResourceReference calls that @cdcampos has reported.
I've managed to narrow down where it goes off the rails - executeGet() in UriProcessorNew. That's a bit of a surprise - from what @c-harris was saying, he was suspecting serialisation.
from podata.
I think that #201 fixes this issue.
from podata.
Yes, it is working now, I confirm.
Testing this I found another issue also on $expand: #203
from podata.
Sweet, thanks for your feedback, patience and help.
from podata.
My own testing has revealed that I sort of over-egged the pudding in #201, and I've had to revert one of the involved commits. In light of that, cdcampos, is this still fixed?
from podata.
Yes, still works 👍
from podata.
Sweet, thank you. Back this issue goes.
from podata.
Related Issues (20)
- Error writing JSON output HOT 3
- Missing namespace in metadata info for a result entry HOT 8
- Need to rework the Metadata Provider HOT 2
- Missing output when $expand results are empty HOT 10
- undefined method MetadataManager::getResourceSetNameFromResourceType HOT 6
- Where is index.php and what is its contents? HOT 7
- No writer can handle the request with "Accept: application/json;odata.metadata=minimal" HOT 1
- How to mapping Entity inside a schema HOT 3
- Handling PHP_EOL in IndentedTextWriter::getResult() method HOT 30
- kirill533 changes HOT 1
- Improved memory management for large query sets.
- Dependency Hell HOT 8
- Configurable date format HOT 3
- ODataConstants::JSON_LIGHT_NEXT_STRING HOT 1
- Documentation
- Write support HOT 3
- Json requests with empty accept header values don't work
- Error: Value '24' is not part of the enum POData\Providers\Metadata\ResourcePropertyKind HOT 1
- Support for php 8.0 and 8.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podata.