-
Notifications
You must be signed in to change notification settings - Fork 7
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
Formalisation of fetch models #2313
Comments
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
* Remove base superclass AbstractRetrievalModel. * Make classes immutable by using a builder for initialisation. * As a result of the former, shed some unnecessary fields.
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
The concept of retrievability should be easier to comprehend than its negation (for some reason named "purity").
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
homedirectory
added a commit
that referenced
this issue
Sep 11, 2024
homedirectory
added a commit
that referenced
this issue
Sep 13, 2024
homedirectory
added a commit
that referenced
this issue
Sep 13, 2024
homedirectory
added a commit
that referenced
this issue
Sep 16, 2024
homedirectory
added a commit
that referenced
this issue
Sep 16, 2024
homedirectory
added a commit
that referenced
this issue
Sep 16, 2024
homedirectory
added a commit
that referenced
this issue
Sep 16, 2024
homedirectory
added a commit
that referenced
this issue
Sep 17, 2024
homedirectory
added a commit
that referenced
this issue
Sep 17, 2024
homedirectory
added a commit
that referenced
this issue
Sep 19, 2024
* Perform lazy instantiation of the parameters map in the builder * Documentation for all nullable values * Documentation for methods and classes
homedirectory
added a commit
that referenced
this issue
Sep 19, 2024
…nted This will allow us to better understand if and when such cases occur.
homedirectory
added a commit
that referenced
this issue
Sep 19, 2024
QueryExecutionModel is immutable.
homedirectory
added a commit
that referenced
this issue
Sep 23, 2024
homedirectory
added a commit
that referenced
this issue
Sep 23, 2024
homedirectory
added a commit
that referenced
this issue
Oct 1, 2024
This predicate is no longer needed as QuerySourceInfo is used for the same filtering effect. Semantics of this predicate are replicated in QuerySourceInfoProvider.generateQuerySourceItems.
homedirectory
added a commit
that referenced
this issue
Oct 1, 2024
New tests: * Fetching of "id" in synthetic entities. * Fetching of calculated properties. * Fetching of composite key and its members. The change to QuerySourceInfoProvider facilitates usage of test entity types, and also hardens the implementation by generating models on demand instead of returning null which would lead to NPE.
homedirectory
added a commit
that referenced
this issue
Oct 1, 2024
homedirectory
added a commit
that referenced
this issue
Oct 2, 2024
…uring yields enhancement The FIXME is resovled: retrieval models now recognise presence of ID in synthetic entities. As IRetrievalModel.containsOnlyTotals had been introduced only for the purpose of special handling of ID, it is no longer needed as well.
homedirectory
added a commit
that referenced
this issue
Oct 2, 2024
Optional.filter().isPresent() is more efficient than Optional.map() because it doesn't perform allocation.
homedirectory
added a commit
that referenced
this issue
Oct 2, 2024
Introduce method signature with(propName) which explores entities by default. This change does not affect semantics. private void includeAllCompositeKeyMembers() { entityMetadataUtils.compositeKeyMembers(entityMetadata) - .forEach(pm -> with(pm.name(), !pm.type().isEntity())); + .forEach(pm -> with(pm.name())); } The above piece is also unaffected, as entity exploration skipping would have been true only for non-entity typed properties...
homedirectory
added a commit
that referenced
this issue
Oct 2, 2024
Optional.filter().isPresent() is more efficient than Optional.map() because it doesn't perform allocation.
homedirectory
added a commit
that referenced
this issue
Oct 2, 2024
homedirectory
added a commit
that referenced
this issue
Oct 3, 2024
homedirectory
added a commit
that referenced
this issue
Oct 3, 2024
homedirectory
added a commit
that referenced
this issue
Oct 3, 2024
It had already been effectively immutable due to the use of method `copy` but still used mutable data structures for internal state, which was not a strong invariant.
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
… property The main change is in Source1BasedOnQueries.produceQuerySourceInfoForEntityType. Implementin this required IDomainMetadata to be accessible to Source1BasedOnQueries. Its `transform` method takes a TransformationContextFromStage1To2 as an argument, so I considered it reasonable to enhance that type with a IDomainMetadata component. The bulk of changes is related to this enhancement.
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
Prior to this change, the following example query would have failed: select(select(Vehicle.class).yieldAll().modelAsAggregate()) .yield().prop("id").as("id") .modelAsEntity(Vehicle.class)
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
QuerySourceInfoProvider is more suited to contain this method as it is similar to other methods declared by it - most of them produce instances of QuerySourceInfo.
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
homedirectory
added a commit
that referenced
this issue
Oct 8, 2024
And the returned null wasn't being handled.
homedirectory
added a commit
that referenced
this issue
Oct 11, 2024
homedirectory
added a commit
that referenced
this issue
Nov 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The concept of fetch models in TG is fairly sophisticated, requiring a thorough analysis of the source code to be understood.
The goal of this issue is to create a specification for fetch models, so that they can be understood more easily by both platform and application developers.
ua.com.fielden.platform.entity.query.fluent.fetch.FetchCategory
).Expected outcome
Fetch models are properly documented, facilitating informal reasoning for developers.
Technical details
There are 3 core abstractions related to fetch models:
ua.com.fielden.platform.entity.query.fluent.fetch
- used to specify a fetch model for an EQL query;ua.com.fielden.platform.entity.fetch.IFetchProvider
- primarily used by entity companions and Web UI; ultimately gets converted to afetch
via methodfetchModel()
; was introduced by Entity Fetch Strategy #120 with a goal to have a developer-friendly API;ua.com.fielden.platform.entity.query.IRetrievalModel
- implementation-side representation of fetch models, used by the EQL engine.To maximise visibilty of documentation, it is proposed to attach it to the
fetch
class, which can be referred to byIFetchProvider
.IRetrievalModel
is located in a different module, inplatform-dao
, and can't be referenced by the other two, which are located inplatform-pojo-bl
, but that is not a problem sinceIRetrievalModel
is not directly visible to developers anyway.Change overview
IRetrievalModel
and its implementations).QuerySourceInfoProvider
).QuerySourceInfoProvider
, which enables it to determine whether propertyid
(any property, in general) should be included for any given synthetic entity type. This simplifies the implementation by using a proper abstraction (QuerySourceInfoProvider
) instead of having to handle each property by hand.id
,key
andversion
are assigned plain nature when generating metadata for synthetic entities. Previously, they could be assigned persistent nature, which doesn't make sense for synthetic entities.fetch.with(CharSequence, CharSequence...)
for convenience of specifying multiple properties (equivalent change was made for methodwithout
).fetch
andEntityRetrievalModel
.IRetrievalModel.containsOnlyTotals
, since propertyid
doesn't need special handling during yield enhancement in synthetic entities.ImmutableCollectionUtil
) and maps (ImmutableMapUtils
).yieldAll
. Such queries had not been expected and thus had been unsupported.Required changes in TG applications
The text was updated successfully, but these errors were encountered: