I'm not sure if this is the best way, but sometimes i use
"non-updatable relationships" for one-to-one relationships where the ids
are in a known set of possibilities. I can't remember the proper
notation, but:
class Tagtype {
static mapping {
customerId column:'ID_CUSTOMER'
customer column:'ID_CUSTOMER', insertable: false,
updateable: false
}
long customerId // updatable
Customer customer // read-only
}
Then i use "fetch join" to load the relationship. But i use this
kind of mapping for very particular cases.
Brad Rhoads wrote:
> There are cases where I already know the the id of an associated
> object. For example this works:
> (...)
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email