Yes !!!! That did the trick. I tried the 4.0 « stable » version and my method was clearly named « test() ».
I’ve updated its name with « getTest() » and Wouahhhh. If it’s just a matter of update to get « test() » work, that means I can go further in my tests ;-) Many thank’s ! Jérémy DE ROYER Le 15 avr. 2019 à 18:24, Hugi Thordarson <h...@karlmenn.is<mailto:h...@karlmenn.is>> a écrit : Hi Jérémy. Filtering by expressions on a method should work fine. What you're probably hitting here is that you're using version 4.0 of Cayenne, which doesn't have full support for method names not prefixed with the JavaBean style "get". A fix is already in version 4.2 and will hopefully get backported to 4.1 (we also have a class to fix the problem in the current 4.1 that we can share with you if you want to pursue this). Personally, I recommend that you base your development effort on version 4.1, especially since you're not going directly into production. It's very stable (I use it in production myself) and has a lot of improvements (sorry about not mentioning that earlier). Cheers, - hugi On 15 Apr 2019, at 14:05, Jérémy DE ROYER <jeremy.dero...@ingencys.net<mailto:jeremy.dero...@ingencys.net>> wrote: Hello, Does Cayenne supports in-memory filtering ? (like EOF does, I mean without takinbg car if it’s sql ou java) As explained is the doc, I wrote without any effort : Expression e = Artist.NAME.in<http://Artist.NAME.in><http://Artist.NAME.in>("John", "Bob"); List<Artist> filtered = e.filterObjects(unfiltered); Then, I made a new method and change the expression but without success : Expression e = ExpressionFactory.likeExp("customedName", "Bob"); // where customedName() is a method cloning name() List<Artist> filtered = e.filterObjects(unfiltered); But an error raised : org.apache.cayenne.exp.ExpressionException: [v.4.0 Aug 06 2018 12:11:43] Error evaluating expression ‘customedName like "Bob"' Any idea ? Jérémy