-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
TemporalAll for temporal owned entities mapped to parent table. #29156
Comments
Hi, I am currently also exploring the temporal table features in the latest RC of ef core and I ran into the same issue. However if I skip the exception in Do you know for which next release this is considered? Query if I only include owned entities that are mapped to the same table as the parent (OwnsOne): -- PurchasePriceAmount and Currency are mapped to an owned entity
-- Everything after ValidTo is mapped to an owned entity
SELECT [p].[Id]
, [p].[PurchasePriceAmount]
, [p].[PurchasePriceCurrencyIso4217Code]
, [p].[ValidFrom]
, [p].[ValidTo]
, [p].[QuantityOnSupplierStock]
, [p].[ImportedQuantityOnStock]
, [p].[IsOnSupplierStock]
, [p].[SupplierRestockDate]
FROM [xyz].[Offer] FOR SYSTEM_TIME ALL AS [p]
WHERE [p].[Id] = CAST(2 AS BIGINT) Query if I also include owned entities that are mapped in their own table (OwnsMany): SELECT [p].[Id]
, [p].[PurchasePriceAmount]
, [p].[PurchasePriceCurrencyIso4217Code]
, [p].[ValidFrom]
, [p].[ValidTo]
, [p].[QuantityOnSupplierStock]
, [p].[ImportedQuantityOnStock]
, [p].[IsOnSupplierStock]
, [p].[SupplierRestockDate]
, [d].[Id]
, [d].[CountryOfDeliveryIsoCode]
, [d].[DeliveryDurationSourceTypeId]
, [d].[OfferId]
, [d].[ValidFrom]
, [d].[ValidTo]
, [d].[DurationHighPercentileLowerBound]
, [d].[DurationHighPercentileUpperBound]
, [d].[DurationMediumPercentile]
FROM [xyz].[Offer] FOR SYSTEM_TIME ALL AS [p]
LEFT JOIN [xyz].[OfferDeliveryDuration] FOR SYSTEM_TIME ALL AS [d]
ON [p].[Id] = [d].[OfferId]
WHERE [p].[Id] = CAST(2 AS BIGINT) |
Any new information about this issue? Could it at least be possible to allow OwnsOne since it gives the correct value (if you skip the ValidateQueryRootCreation check)? |
…ent table. Similar to JSON entities, owned entities that are mapped to the same table as their owner should be treated as scalars for the purpose of temporal query validation - they are always in sync with the parent entity, so all operations should be allowed for them, not only AsOf. Fixes #29156
…ent table. Similar to JSON entities, owned entities that are mapped to the same table as their owner should be treated as scalars for the purpose of temporal query validation - they are always in sync with the parent entity, so all operations should be allowed for them, not only AsOf. Fixes #29156
…ent table. (#32031) Similar to JSON entities, owned entities that are mapped to the same table as their owner should be treated as scalars for the purpose of temporal query validation - they are always in sync with the parent entity, so all operations should be allowed for them, not only AsOf. Fixes #29156
Hi All,
There are several related issues, but I couldn't find any issue on this specific topic. I apologize if it's a duplicate.
I read the conversations. I do see the point regarding data inconsistencies in cases where we have to include the navigations, especially from non-temporal tables. But, how about this scenario (which is very common)
Issues:
It would be great if we can get any solution. I mean even some workaround. I'm open to any ideas from the team and community.
Environment
.NET SDK (reflecting any global.json):
Version: 6.0.400
Commit: 7771abd614
Microsoft.EntityFrameworkCore.SqlServer
Version: "7.0.0-rc.1.22426.7"
Full sample (ready to run). I listed 6 possible options.
The text was updated successfully, but these errors were encountered: