Ok here is what I have so far, but the issue remains the same with criteria builder as well.
var c = forumService.newCriteria();
var result =
c.add(
c.createSubcriteria( "fbCategory", "cat" )
.withProjections( property="categoryId" )
.propertyEq( "categoryId" )
.maxResults(1)
)
.list( );
The error is, is this a limitation on ORM or is this a problem with criteria builder itself?
Application Execution Exception
Error Type: Object : [N/A]
Error Messages: The maxResults method was not found.
Either there are no methods with the specified method name and argument types or the maxResults method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.