[coldbox-5.6.2] [cborm-2.50] - INNER JOIN to database table not defined as an entity

Is it possible within cborm to join into another table which is not defined as an entity using the criteria?

So for example joining to users on id in users table and userid in current entity.

.newCriteria()
.isTrue(‘active’)
.joinTo( “users” )
.on( “userid” , “id”)

I think you can’t because hibernate doesn’t know about it, but I have never tried it. Now, you can create a sql restriction and then do anything you like there in plain sql

Thanks Luis, I will take a look into the sql restriction.

On a side note I really appreciate all the hard work you and your team have put into coldbox and love all the great features and improved productivity it has provided my team.