Could someone describe how SemQL function any...has(something=something) works? What is difference when has is replaced with have? What are the supported parameters in this function? What else should I know when using this any..has(..) function?
Best Answer
C
Cédric BLANC
said
almost 3 years ago
The any/all SemQL syntax allows you to query child entities records.
"any" means at least one record from the child entity follows the condition.
"all" means all records from the child entity follow the condition.
"has" and "have" behave exactly the same, they exist only for the expression to be grammatically correct, but you may use one or the other interchangeably.
A good tip is to use 1=1 as a condition when the goal is just to check child records existence without any other specific criteria. For example, either of these will return true if at least one contact exists for the parent record:
"any" means at least one record from the child entity follows the condition.
"all" means all records from the child entity follow the condition.
"has" and "have" behave exactly the same, they exist only for the expression to be grammatically correct, but you may use one or the other interchangeably.
A good tip is to use 1=1 as a condition when the goal is just to check child records existence without any other specific criteria. For example, either of these will return true if at least one contact exists for the parent record:
I have 2 questions regarding these ANY/ALL SemQL clauses:
1 - How does the following SemQL condition behaves in the situation of a Parent record not having any Children Contacts ?
NOT ANY Contact HAS (1=1)
Does it returns TRUE or FALSE?
2 - When using those ANY/ALL SemQL conditions, is there any way to enforce Semarchy xDM to perform the search only in the SD Tables? There is some contexts where we only want to validate the information existing in the scope of the current load, and so it could be useful to prevent xDM from querying the MD tables.
Cédric BLANC
Could someone describe how SemQL function any...has(something=something) works? What is difference when has is replaced with have? What are the supported parameters in this function? What else should I know when using this any..has(..) function?
The any/all SemQL syntax allows you to query child entities records.
any/all <child_entity_role> have/has ( <condition_on_child_entity> )
"any" means at least one record from the child entity follows the condition.
"all" means all records from the child entity follow the condition.
"has" and "have" behave exactly the same, they exist only for the expression to be grammatically correct, but you may use one or the other interchangeably.
A good tip is to use 1=1 as a condition when the goal is just to check child records existence without any other specific criteria. For example, either of these will return true if at least one contact exists for the parent record:
ANY Contact HAS (1=1)
ANY Contact HAS ( ID IS NOT NULL )
More details and examples in this documentation.
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCédric BLANC
The any/all SemQL syntax allows you to query child entities records.
any/all <child_entity_role> have/has ( <condition_on_child_entity> )
"any" means at least one record from the child entity follows the condition.
"all" means all records from the child entity follow the condition.
"has" and "have" behave exactly the same, they exist only for the expression to be grammatically correct, but you may use one or the other interchangeably.
A good tip is to use 1=1 as a condition when the goal is just to check child records existence without any other specific criteria. For example, either of these will return true if at least one contact exists for the parent record:
ANY Contact HAS (1=1)
ANY Contact HAS ( ID IS NOT NULL )
More details and examples in this documentation.
Joao ROSEIRABORGES
I have 2 questions regarding these ANY/ALL SemQL clauses:
1 - How does the following SemQL condition behaves in the situation of a Parent record not having any Children Contacts ?
NOT ANY Contact HAS (1=1)
Does it returns TRUE or FALSE?
2 - When using those ANY/ALL SemQL conditions, is there any way to enforce Semarchy xDM to perform the search only in the SD Tables?
There is some contexts where we only want to validate the information existing in the scope of the current load, and so it could be useful to prevent xDM from querying the MD tables.
-
Extend a model with new entities or attributes
-
Data types in xDM
-
Effective date on entities
-
Search using wild cards
-
Export a model from production and import on a development environment
-
"Allow Delete" vs "Allow Removal" privileges
-
LOV label in Named Query
-
Select location on a map and save coordinates
-
Is there a way to set up a master-detail relationship on browse mode?
-
Choose Either a Stepper or A Workflow Based on The User Privileges
See all 291 topics