- ABP Framework version: v7.4.0
- UI Type: Blazor Server
- Database System: MongoDB
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
Hi,
We are getting the following when trying to join collections.
from licence in (await GetMongoQueryableAsync<Licence>())
join licenceParty in ((await GetMongoQueryableAsync<LicenceParty>())) on licence.Id equals licenceParty.LicenceId into licenceParties
select new { licence, licenceParties };
Expression not supported: LicenceParties.Aggregate([]).Where(e => (Convert(e, ISoftDelete).IsDeleted == False)).Where(e => (Convert(e, IMultiTenant).TenantId == 1841fe4f-3eef-8282-6391-3a0e5870cd67)) in Licences.Aggregate([]).Where(e => (Convert(e, ISoftDelete).IsDeleted == False)).Where(e => (Convert(e, IMultiTenant).TenantId == 1841fe4f-3eef-8282-6391-3a0e5870cd67)).GroupJoin(LicenceParties.Aggregate([]).Where(e => (Convert(e, ISoftDelete).IsDeleted == False)).Where(e => (Convert(e, IMultiTenant).TenantId == 1841fe4f-3eef-8282-6391-3a0e5870cd67)), licence => licence.Id, licenceParty => licenceParty.LicenceId, (licence, licenceParties) => new <>f__AnonymousType0`2(licence = licence, licenceParties = licenceParties)) because inner expression is not an IMongoQueryable representing a collection.
3 Answer(s)
-
0
Hi,
You can refer to this code: https://github.com/abpframework/abp/blob/dev/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs
-
0
Hi,
We are trying to integrate OData using https://github.com/mongodb/mongo-aspnetcore-odata package. We need to return an IQueryable and not list.
If we use (dbContext.Collection<LicenceParty>().AsQueryable()) instead of ((await GetMongoQueryableAsync<LicenceParty>())), it fixes the error, but not sure on how to apply the data filters.
I have provided the sample for brevity, but this will be a more complex query with multiple joins like licence party joined to Party etc. We have tried a few methods but was getting error in the query.
-
0
Hi,
It looks like a problem with the MongoDB driver