ORM LIKE

I know how to write the query using ormExecuteQuery() to find all records using a LIKE comparison but I am a little confused on how to do that with my VirutalService.

What are all of the criteria arguments, are those just a structure of params or are those actual hibernate criteria objects? Just a little confused on the best approach do to a like comparison ?

Dan,

You can just write your query like you would normally and pass it to the executeQuery function.

Curt

ok, that is what I thought…

how about adding (I would be happy to help) some dynamic finders like GORM

findWhere = pass criteria

I like this syntax better

findByName(“Dan”)
findByNameAndAge(“Dan”,32);
findByNameLike("%Dan%");

Thank You
Dan Vega
danvega@gmail.com
http://www.danvega.org/

Does ORMService.findWhere() not work for you?

Where ORMService is baseORMService, works for me.

Regards,

Andrew Scott

http://www.andyscott.id.au/

It was just added actually. Well something similar. Check out the new ormsample application and these docs.

http://wiki.coldbox.org/wiki/Extras:BaseORMService.cfm#criteriaQuery

Curt

I was under the impression that findWhere is looking for an exact match and not a like comparison? is that not the case?

findWhere is an exact match correct.

Thanks for the criteria docs link curt … that is exactly what I was looking for…