Child pages
  • JSRelation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
For more information see [Relations]\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#INNER_JOIN]
Constant for set/get the joinType of a JSRelation.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#LEFT_OUTER_JOIN]
Constant for set/get the joinType of a JSRelation.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#allowCreationRelatedRecords]
Flag that tells if related records can be created through this relation.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#allowParentDeleteWhenHavingRelatedRecords]
Flag that tells if the parent record can be deleted while it has related records.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteRelatedRecords]
Flag that tells if related records should be deleted or not when a parent record is deleted.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#foreignDataSource]
Qualified name of the foreign data source.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#initialSort]
A String which specified a set of sort options for the initial sorting of data
retrieved through this relation.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#joinType]
The join type that is performed between the primary table and the foreign table.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#name]
The name of the relation.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#primaryDataSource]
Qualified name of the primary data source.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[JSRelationItem]\[]{td}{td}[#getRelationItems]\()
Returns an array of JSRelationItem objects representing the relation criteria defined for this relation.{td}{tr}{tbody}{tbody}{tr}{td}[UUID]{td}{td}[#getUUID]\()
Returns the UUID of the relation object{td}{tr}{tbody}{tbody}{tr}{td}[JSRelationItem]{td}{td}[#newRelationItem]\(dataprovider, operator, foreinColumnName)
Creates a new relation item for this relation.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#removeRelationItem]\(primaryDataProviderID, operator, foreignColumnName)
Removes the desired relation item from the specified relation.{td}{tr}{tbody}{table}\\ 

{table:id=constant|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=INNER_JOIN|class=node}{tr:id=name}{td}h6.INNER_JOIN{td}{tr}{tr:id=des}{td}Constant for set/get the joinType of a JSRelation. It is also used in solutionModel.newRelation(...).{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\ [Number]{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
varcode:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.joinType = JSRelation.LEFT_OUTER_JOIN;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=LEFT_OUTER_JOIN|class=node}{tr:id=name}{td}h6.LEFT_OUTER_JOIN{td}{tr}{tr:id=des}{td}Constant for set/get the joinType of a JSRelation. It is also used in solutionModel.newRelation(...).{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[Number]{td}{tr}{tr:id=prssam}{td}*ParametersSample*\\{tddiv:class=sIndent}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild'code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.joinType = JSRelation.LEFT_OUTER_JOIN;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=allowCreationRelatedRecords|class=node}{tr:id=name}{td}h6.allowCreationRelatedRecords{td}{tr}{tr:id=des}{td}Flag that tells if related records can be created through this relation.

The default value of this flag is "false".{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[Boolean]{td}{tr}{tr:id=prssam}{td}*ParametersSample*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Boolean]{td}{tr}{tr:id=see}{td}*Also see*\\{div:div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.allowCreationRelatedRecords = true;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=allowParentDeleteWhenHavingRelatedRecords|class=node}{tr:id=name}{td}h6.allowParentDeleteWhenHavingRelatedRecords{td}{tr}{tr:id=des}{td}Flag that tells if the parent record can be deleted while it has related records.

The default value of this flag is "true".{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[Boolean]{td}{tr}{tr:id=prssam}{td}*ParametersSample*\\{tddiv:class=sIndent}{tr}{tr:id=ret}{td}*Returns*\\[Boolean]code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.allowParentDeleteWhenHavingRelatedRecords = false;
{code}{div}{td}{tr}{tr:idclass=seelastDetailRow}{td}*Also see*\\{div:class=sIndent{td}{divtr}{tdtbody}{trtbody:id=deleteRelatedRecords|class=node}{tr:id=linkname}{td}*External links*\\{div:class=sIndent}{div}{h6.deleteRelatedRecords{td}{tr}{tr:id=samdes}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.allowParentDeleteWhenHavingRelatedRecords = false;
{code}{div}{td}{Flag that tells if related records should be deleted or not when a parent record is deleted.

The default value of this flag is "false".{td}{tr}{tr:classid=lastDetailRowret}{td}*Returns*\\ [Boolean]{td}{tr}{tbody}{tbody:id=deleteRelatedRecords|class=node}{tr:id=namesam}{td}h6.deleteRelatedRecords{td}{tr}{tr:id=des}{td}Flag that tells if related records should be deleted or not when a parent record is deleted.

The default value of this flag is "false".*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.deleteRelatedRecords = true;
{code}{div}{td}{tr}{tr:idclass=snclastDetailRow}{td}*Since*\\ Replace with version info{{td}{tr}{tbody}{trtbody:id=prs}{td}*Parameters*\\{td=foreignDataSource|class=node}{tr}{tr:id=retname}{td}*Returns*\\[Boolean]h6.foreignDataSource{td}{tr}{tr:id=seedes}{td}*Also see*\\{div:class=sIndent}{div}{Qualified name of the foreign data source. Contains both the name of the foreign
server and the name of the foreign table.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{ [String]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.deleteRelatedRecordsprimaryDataSource = true;
{code}{'db:/user_data/another_parent_table';
relation.foreignDataSource = 'db:/user_data/another_child_table';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=foreignDataSourceinitialSort|class=node}{tr:id=name}{td}h6.foreignDataSourceinitialSort{td}{tr}{tr:id=des}{td}QualifiedA String namewhich ofspecified thea foreignset dataof source.sort Containsoptions bothfor the nameinitial sorting of thedata
foreignretrieved serverthrough andthis therelation.
name
ofHas the foreign table.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info form "column\_name asc, another\_column\_name desc, ...".{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\ [String]{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.primaryDataSourceinitialSort = 'db:/user_data/another_parentchild_table_text asc';
relation.foreignDataSource = 'db:/user_data/another_child_table';
{code}{div}{{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=initialSortjoinType|class=node}{tr:id=name}{td}h6.initialSortjoinType{td}{tr}{tr:id=des}{td}AThe join Stringtype whichthat specifiedis aperformed setbetween ofthe sortprimary optionstable forand the initialforeign sortingtable.
ofCan databe retrieved"inner throughjoin" thisor relation."left 
Has the form "column\_name asc, another\_column\_name desc, ..."outer join".{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[Number]{td}{tr}{tr:id=prssam}{td}*ParametersSample*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndentdiv:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.joinType = JSRelation.LEFT_OUTER_JOIN;
{code}{div}{td}{tr}{tr:id=linkclass=lastDetailRow}{td}{td}*External links*\\{div:class=sIndent}{div}{td}{}{tr}{tbody}{tbody:id=name|class=node}{tr:id=name}{td}h6.name{td}{tr}{tr:id=des}{td}The name of the relation.{td}{tr}{tr:id=samret}{td}*SampleReturns*\\{div:class=sIndent}{code [String]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.initialSortname = 'another_child_table_text asc';
'anotherName';
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.relationName = relation.name;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=joinTypeprimaryDataSource|class=node}{tr:id=name}{td}h6.joinTypeprimaryDataSource{td}{tr}{tr:id=des}{td}The join type that is performed betweenQualified name of the primary data source. Contains both the primaryname table andof the foreignprimary table.server
Canand bethe "innername join"of orthe "left outer join"primary table.{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info[String]{td}{tr}{tr:id=prssam}{td}*ParametersSample*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation(div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.joinTypeprimaryDataSource = JSRelation.LEFT_OUTER_JOIN;
{code'db:/user_data/another_parent_table';
relation.foreignDataSource = 'db:/user_data/another_child_table';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{tbodytable:id=namefunction|class=nodeservoy sDetail}{colgroup}{tr:id=namecolumn:padding=0px|width=100%}{tdcolumn}h6.name{tdcolgroup}{tr:style=height: 30px;}{trth:idcolspan=des1}Method Details{td}The name of the relation.{td}{trth}{tr}{tbody:id=getRelationItems|class=node}{tr:id=sncname}{td}*Since*\\ Replace with version infoh6.getRelationItems{td}{tr}{tr:id=prssig}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{{span:style=float: left; margin-right: 5px;}[JSRelationItem]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getRelationItems{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=linkdes}{td}*External links*\\{div:class=sIndent}{div}Returns an array of JSRelationItem objects representing the relation criteria defined for this relation.{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSRelationItem]\[] -- An array of JSRelationItem instances representing the relation criteria of this relation.{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relationcriteria = solutionModelrelation.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.name = 'anotherName';
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.relationName = relation.name;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=primaryDataSource|class=node}{tr:id=name}{td}h6.primaryDataSource{td}{tr}{tr:id=des}{td}Qualified name of the primary data source. Contains both the name of the primary server
and the name of the primary table.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.primaryDataSource = 'db:/user_data/another_parent_table';
relation.foreignDataSource = 'db:/user_data/another_child_table';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getRelationItems|class=node}{tr:id=name}{td}h6.getRelationItems{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRelationItem]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getRelationItems{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Returns an array of JSRelationItem objects representing the relation criteria defined for this relation.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[JSRelationItem]\[] -- An array of JSRelationItem instances representing the relation criteria of this relation.{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var criteria = relation.getRelationItems();
for (var i=0; i<criteria.length; i++)
{
	var item = criteria[i];
	application.output('relation item no. ' + i);
	application.output('primary column: ' + item.primaryDataProviderID);
	application.output('operator: ' + item.operator);
	application.output('foreign column: ' + item.foreignColumnName);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getUUID|class=node}{tr:id=name}{td}h6.getUUID{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[UUID]{span}{span:id=iets|style=float: left; font-weight: bold;}getUUID{span}{span:id=iets|style=float: left;}\(){spangetRelationItems();
for (var i=0; i<criteria.length; i++)
{
	var item = criteria[i];
	application.output('relation item no. ' + i);
	application.output('primary column: ' + item.primaryDataProviderID);
	application.output('operator: ' + item.operator);
	application.output('foreign column: ' + item.foreignColumnName);
}
{code}{div}{td}{tr}{tr:idclass=deslastDetailRow}{td}Returns the UUID of the relation object{td}{tr}{trtbody}{tbody:id=getUUID|class=sncnode}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prsname}{td}*Parameters*\\h6.getUUID{td}{tr}{tr:id=retsig}{td}*Returns*\\}{span:style=float: left; margin-right: 5px;}[UUID]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{span}{span:id=iets|style=float: left; font-weight: bold;}getUUID{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Returns the UUID of the relation object{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{ [UUID]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
application.output(relation.getUUID().toString())
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newRelationItem|class=node}{tr:id=name}{td}h6.newRelationItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRelationItem]{span}{span:id=iets|style=float: left; font-weight: bold;}newRelationItem{span}{span:id=iets|style=float: left;}\(dataprovider, operator, foreinColumnName){span}{td}{tr}{tr:id=des}{td}Creates a new relation item for this relation. The primary dataprovider, the foreign data provider 
and one relation operators (like '=' '!=' '>' '<') must be provided.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} dataprovider -- The name of the primary dataprovider.
\{[String]} operator -- The operator used to relate the primary and the foreign dataproviders.
\{[String]} foreinColumnName -- The name of the foreign dataprovider.
{td}{tr}{tr:id=ret}{td}*Returns*\\[JSRelationItem] -- A JSRelationItem instance representing the newly added relation item.{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{ dataprovider.
{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{ [JSRelationItem] -- A JSRelationItem instance representing the newly added relation item.{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('parentToChild', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
relation.newRelationItem('another_parent_table_id', '=', 'another_child_table_parent_id');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeRelationItem|class=node}{tr:id=name}{td}h6.removeRelationItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeRelationItem{span}{span:id=iets|style=float: left;}\(primaryDataProviderID, operator, foreignColumnName){span}{td}{tr}{tr:id=des}{td}Removes the desired relation item from the specified relation.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info item from the specified relation.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} primaryDataProviderID -- the primary data provider (column) name
\{[String]} operator -- the operator
\{[String]} foreignColumnName -- the foreign column name
{td}{tr}{tr:id=ret}{td}*Returns*\\void{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var relation = solutionModel.newRelation('myRelation', 'myServer', 'parentTable', 'myServer', 'childTable', JSRelation.INNER_JOIN);
relation.newRelationItem('someColumn1', '=', 'someColumn2');
relation.newRelationItem('anotherColumn', '=', 'someOtherColumn');
relation.removeRelationItem('someColumn1', '=', 'someColumn2');
var criteria = relation.getRelationItems();
for (var i = 0; i < criteria.length; i++) {
	var item = criteria[i];
	application.output('primary column: ' + item.primaryDataProviderID);
	application.output('operator: ' + item.operator);
	application.output('foreign column: ' + item.foreignColumnName);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}