The solution to this is to have one mapping for schema creation that refers to the class that will generate the foreign constraint.
Code:
<many-to-one name="circuit" class="DBCircuit" column="circuitid" access="field" lazy="false" not-null="false"/>
And another mapping for runtime useage that just uses a property. Something like
Code:
<property name="circuit" column="circuitid" access="field" type="long"/>
So far this is working fine. Just as long as the 'type' used for the foreign key is always a long. I don't know how to enforce that in my DDL mapping, but I'm not going to worry about it just yet.