Yes, much the same as you would with a RDBMS.
You'll have to insert the individual Lists (either by inserting their members, or by using "from").
Outer product:-
when
FactA( )
FactB( )
then
Inner join:-
when
FactA( $pk : pk)
FactB( fk == $pk )
then
left and right joins follow similarly (you'd have to check if the outer key equals or is null).
Is it possible to have a rule that creates something similar to a SQL join.
For example, the working memory has the following:
List<Fact_A> and List<Fact_B>.
In the "if" of the drl rule we want to check
if Fact_A.someAttribute (some_condition) Fact_B.someOtherAttribute
//some_condition could be .equals(), .startsWith(), notEquals() ...
then
//somehow Fact_A and Fact_B
Any examples or pointers would be greatly appreciated.
Thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/Is-it-possible-to-implement-something-similar-to-a-SQL-join-in-Drools-tp4017908.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users