<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
JimmyM wrote:
<blockquote cite="mid:14589695.post@talk.nabble.com" type="cite">
  <pre wrap="">There was an error in the sample code i posted earlier. 
objList should have been objList2

$o2 : Object2(objList2.field1 != null) from $o1.object2
  </pre>
</blockquote>
I assume that objList2 is a collection? If so how can you access a
field on a collection, you can't. $o1.object2 is returning an object<br>
not a collection, which means it'll pattern match against that single
object. Remember I said that the 'from' expression must<br>
return a collection, if necessary you'll need to chain the 'from's.<br>
<blockquote cite="mid:14589695.post@talk.nabble.com" type="cite">
  <pre wrap="">
this also returns the error "unable to resolve property: field1"

Mark Proctor wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">   
make sure the 'from' expression returns a collection, then this will do 
what you want.


    </pre>
  </blockquote>
  <pre wrap=""><!---->also when i use this instead (java.util.Arraylist has been imported):

$o2 : ArrayList(objList2.field1 != null) from $o1.object2

the error is:

unable to resolve property: unable to resolve token: objList2.field1 

I've inserted only the base object (object1) into working memory. 
For some reason i cant access attributes deeper than object 2. 

What am i doing wrong? 



  </pre>
</blockquote>
<br>
</body>
</html>