﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>CapableObjects Forums / ECO / General discussions  / how to write ocl expression like this? / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>CapableObjects Forums</description><link>http://www.capableobjects.com/apps/InstantForum414/</link><webMaster>forums@capableobjects.com</webMaster><lastBuildDate>Wed, 08 Feb 2012 22:28:53 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: how to write ocl expression like this?</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5071-4-1.aspx</link><description>All you need is this&lt;br&gt;&lt;br&gt;ClassA.allInstances.RoleNamePointingToB.RoleNamePointingToC&lt;br&gt;&lt;br&gt;</description><pubDate>Wed, 31 Mar 2010 10:49:01 GMT</pubDate><dc:creator>Peter Morris</dc:creator></item><item><title>RE: how to write ocl expression like this?</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5071-4-1.aspx</link><description>assuming a1 and b1 are parameters passed into the ocl:&lt;/P&gt;&lt;P&gt;C.AllInstances-&amp;gt;select(a = a1 and b = b1)</description><pubDate>Tue, 30 Mar 2010 20:22:55 GMT</pubDate><dc:creator>brian</dc:creator></item><item><title>RE: how to write ocl expression like this?</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5071-4-1.aspx</link><description>Sorry,my english is not good enough to tell you my means.&lt;br&gt;My mean is I have get two objects a1 and b1;I want to get all the c objects which c.a=a1 and c.b=b1;&lt;br&gt;Can I get the list wich ocl expression and oclps expression.&lt;br&gt;thanks.</description><pubDate>Tue, 30 Mar 2010 07:35:10 GMT</pubDate><dc:creator>wangwei.njcn</dc:creator></item><item><title>RE: how to write ocl expression like this?</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5071-4-1.aspx</link><description>Not sure what you are trying to do.  When working with eco objects you do not need to write joins to access the associated objects.  You can just get all the c objects and access the a or b objects by specifying c.a or c.b.  If you are trying to get all the c objects where a is not null and b is not null then the following ocl should do that:&lt;br&gt;&lt;br&gt;c.AllInstances-&gt;select(not a.IsNull and not b.IsNull)&lt;br&gt;&lt;br&gt;Brian</description><pubDate>Tue, 30 Mar 2010 03:46:35 GMT</pubDate><dc:creator>brian</dc:creator></item><item><title>how to write ocl expression like this?</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5071-4-1.aspx</link><description>I have three classes ,and there relationship like this: a(1..0)-----c(0..*)   and b(1..0)-------c(0..*);&lt;br&gt;how to write ocl expression equal to the sql :select * from c where c.aid=a.id and c.bid=b.id&lt;br&gt;thanks !</description><pubDate>Tue, 30 Mar 2010 00:56:00 GMT</pubDate><dc:creator>wangwei.njcn</dc:creator></item></channel></rss>
