[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] MOXy with arbitary fields
|
Hi Polly,
In terms of the dynamic object. EclipseLink works best if there is a
one-to-one relationship between classes and descriptors. A common
strategy to is to have your dynamic object and then use ASM to create an
empty subclass per descriptor. This sounds inline with what you were
already thinking.
For the dynamic mapping portion you could create the mappings
programmatically. Do you have a simple proof of concept in mind that we
could base the discussion on?
-Blaise
polly.c.chang wrote:
Hi,
I've been using EclipseLink MOXy for a while now and love it. I know how to
define mappings for domain objects to schemas using the deployment XML file.
A recurring question has come up for an alternate use case though. The
problem is sometimes we have a more dynamic use case where we don't know
ahead of time what fields we'll need to map from the schema. We also don't
have a domain object to map to. For the object part, we would probably need
to use some kind of map of maps. If EclipseLink does not support that, I
think we can create a DynaBeans sort of wrapper object to trick MOXy into
thinking that the map-of-maps a nested object graph. But I am not sure what
to do about not knowing the xpaths a priori. How would I define the
mappings? Is the solution to programmatically create mappings directly
using the API?
Thanks!
--Polly