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

.IncludeMany does not work properly with .ToPageAsync #709

Open
rhegner opened this issue Jan 17, 2025 · 0 comments
Open

.IncludeMany does not work properly with .ToPageAsync #709

rhegner opened this issue Jan 17, 2025 · 0 comments

Comments

@rhegner
Copy link

rhegner commented Jan 17, 2025

Consider an example like this:

var res = await Database.Query<Component>()
    .IncludeMany(i => i.Labels)
    .ToPageAsync(1, 1);

This returns one Component (as it should) but it also returns only the first label of that Component, even if there are more labels for that Component in the database. Looks to me like the paging logic is broken with .IncludeMany.

As a side-note: For Components without any Labels, NPoco seems to return Component.Labels=null, whereas Component.Labels=[] (empty array/collection) would be more appropriate IMHO.

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

1 participant