Hi Boris,
Thanks for the reply. The Id type does just wrap a Long in the
database, so there's no custom type there; rather I want a custom type
on the scala side. So I don't think the solution you propose does
quite what I'm looking for. Even if I have an association back to the
same record type, I couldn't use that to fetch an entity by primary
key in a typesafe way, because the primary key type is still just
Long. I'd like to have a custom type Id[Foo] instead (even if the
underlying database type is just Long). Is this supported? What
about other custom field types (for example, having an underlying
varchar field that is a Field[java.util.UUID, _] on the scala side)?
I would like that much more than, say, using validators, because of
the compile checking instead of runtime checking.
-Matthew