openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Adams <matt...@matthewadams.me>
Subject Persistent interfaces & custom value handler
Date Wed, 21 Oct 2009 16:12:30 GMT
Hi all,

We make use of persistent interfaces in our object model.  All of our
entities have a Long id, including all implementations of all
persistent interfaces, so we'd like to map any field that refers to a
persistent interface to two columns, one for the id value and one for
the implementation class name.  Our custom value handler is working
nicely for single-valued fields, but it is not treating collection of
an interface correctly.  Instead of OpenJPA iterating the collection
and calling our custom value handler, it is passing the collection
itself to our value handler.

Question:  how do configure OpenJPA that whenever it encounters an
object of a given type, whether it be in a single- or multi-valued
field, to use a specific value handler?

If we can't do that, how do we implement a value handler that handles
collection fields of types that need to have custom value handlers?

Thanks,
Matthew

Mime
View raw message