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

ProductQuery does not return full type information #418

Open
dbeuchler opened this issue May 8, 2024 · 0 comments
Open

ProductQuery does not return full type information #418

dbeuchler opened this issue May 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dbeuchler
Copy link
Member

Describe the bug
Given is the following product query:

var productTypes = ProductStorage.LoadTypes(new ProductQuery()
{
    Type = typeof(SomeType).FullName
}).Cast<SomeType>().ToArray();

I expect that the product types have all values from the storage but only the base type information are filled. I found the following code in the ProductStorage

return products.Where(p => TypeInformation.ContainsKey(p.TypeName)).Select(p =>
{
    return TypeInformation[p.TypeName].CreateTypeFromEntity(p);
}).ToList();

This is only loading the base type information. All of the other LoadType methods return a full product with all information.

Proposal:

  • A: Return full type information
  • B: Extend ProductQuery to return full type information

Additional context
There is no comment nor hint that this method only returns the base type information instead of full product.

@dbeuchler dbeuchler added the bug Something isn't working label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant