andryuha49 / odata-v4-typeorm

OData to TYPEORM query compiler
MIT License
27 stars 14 forks source link

Fix for #30 #33

Closed blitzmann closed 5 months ago

blitzmann commented 3 years ago

Fixes #30

Testing

Pre-fix

{{base_url}}/api/posts?$expand=author($select=id),category

This would return an empty result set, primarily because we're not explicitly selecting out anything for the Post.

[]

Post-fix

{{base_url}}/api/posts?$expand=author($select=id),category

Produces the expected response:

[
    {
        "id": 1,
        "title": "Ultricies Sem Ltd",
        "text": "quam. Curabitur vel lectus. Cum",
        "author": {
            "id": 1
        },
        "category": {
            "id": 1,
            "name": "Eu Nulla Limited"
        }
    },
...
]