[ ColdBox 3.8.1 with Railo 4.1.2 ] Dynamic Finder cannot find id property of entity.

It seems the dynamic function functions can’t “see” the ID property of an entity?
Related is this post from last year: Google Groups

component table=“watch” persistent=true accessors=true {
property name=“id” column=“watch_id” ormtype=“integer” type=“numeric” fieldtype=“id” generator=“native” generated=“insert”;
snipped other properties

service call:
var Watch = super.findByidAndregistration_id(argumentCollection=arguments);

The property you requested id is not a valid property in the Watch entity
Valid properties are label,year_start,year_end,registration_id,message_id,success_count,failure_count,created,updated,Inventories

In case anyone else comes across this I found a mediocre work-around until this is figured out:
property name="_id" column=“watch_id” remotingfetch=“false” insert=“false” update=“false”;
findBy_idAndregistration_id() now works.

Also side note: if I attached persistent=“false” to that property, I got the same error as before.

Please enter a ticket for this as the id is considered differently in hibernate this not showing up.


mine might be related. dont think i found a work around.

it looks like you removed ormtype, type and fieldtype? did that have adverse effects on ID?

I didn’t remove those attributes from the id property, I simply created a new property that pointed to the id column.

Bug report filed here: [COLDBOX-329] Dynamic Finders cannot find ID property of hibernate entity. - Welcome