I saw the thread discussing this:
http://groups.google.com/group/cf-orm-dev/browse_thread/thread/19dc48732d58fca0/f47f3d4ef2e75aab?lnk=raot&fwc=1
Most of the thread was in October 2009, but the last post from Barney, via Bob was just a couple of months ago.
Anyway, has anything changed, is Barney's solution the way to do a where in clause?
Barney's solution does work form me:
--------------------------------
<cffunction name="ormList" output="false">
<cfargument name="list" />
<cfargument name="type" default="int" />
<cfset var result = [] />
<cfset var i = "" />
<cfloop list="#list#" index="i">
<cfset arrayAppend(result, javaCast(type, i)) />
</cfloop>
<cfreturn result.toArray() />
</cffunction>
Here it is in action:
<cfset images = ormGetSession().createQuery('from Image where id in
(:id)') />
<cfset images.setParameterList('id',
ormList(session.filters.imageId)) />
<cfset images = images.list() />
---------------------------------------------
Using this, can I add the "offset" and "maxresults" options to handle paging?
--
David Mineer Jr
---------------------
The critical ingredient is getting off your
butt and doing something. It's as simple
as that. A lot of people have ideas, but
there are few who decide to do
something about them now. Not
tomorrow. Not next week. But today.
The true entrepreneur is a doer.
--
You received this message because you are subscribed to the Google Groups "cf-orm-dev" group.
To post to this group, send email to
cf-or...@googlegroups.com.
To unsubscribe from this group, send email to
cf-orm-dev+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cf-orm-dev?hl=en.