-
Notifications
You must be signed in to change notification settings - Fork 2
State Consumers and Relations
Gal Koren edited this page Jul 20, 2021
·
7 revisions
What can we fetch and what not? Starting at the "starting table", PL can go along the directional relations (start --> node2 --> node3) any number of nodes and right-JOIN them to a single query. It can also go one step to the opposite direction (start --> node2 <-- node3), left-JOINING node3, but after such step, it cannot continue on this path (anything related to node3 won't be accessible within this query). Here are examples of what is currently supported by the fetcher and what is not.
- AdEntity may fetch fields from CampaignEntity and AccountEntity including from table "account_credentials" which is a secondary table of the account entity.
- AdEntity may not fetch fields from table "account_cred_ext", which is a secondary table of a secondary table of the parent account entity.
- CampaignEntity may fetch fields of AdEntity. This feature is called "Fetch Many" and is not recommended to be used inside PL flow components (validators, enrichers, etc). It is intended to be used by the PL query language. To access the child entity from the resulted parent entity, use the method
getMany(AdEntity.INSTANCE)
. - AccountEntity may not fetch fields of AdEntity. The fetch many feature is not yet recursive and can only handle a single hierarchy level.
Setting up an Entity Persistence
Query language
Building the Flow
- Adding Simple Validators
- State Consumers
- Adding a Custom Validator
- Enrichers
- Output Generators
- Customizing Flows
- Primary and Secondary Tables (detailed example)
- State Consumers and Relations (what can we fetch)
- Child Commands
- Cascade Delete