Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] [MOXy] overriding mapped xpaths

We have a situation like this:

<Foo>
     ... 
    ...
    <C>...</C>
</Foo>

The domain model looks like:

public class MyBasicType {
    String fieldA;
    String fieldB;
}

public class Foo{
    MyBasicType myBasicType
    String fieldC;
}

Normally I'd map the xpaths for MyBasicType to elements "A" and "B" and map
Foo's reference to MyBasicType using an XMLCompositeCollectionMapping.  But
what happens if we want to reuse MyBasicType to map to this document:

<Bar>
    <Y>...</Y>
    <Z>...</Z>
    ...
</Bar>

public class Bar {
    MyBasicType myBasicType
    ...
}

This would require overriding the xpaths defined for MyBasicType's internal
fields based on where MyBascType is used (Foo or Bar).  This is not possible
is it?  What is your recommendation for mapping to this domain model?

Thanks!
--Polly
-- 
View this message in context: http://old.nabble.com/-MOXy--overriding-mapped-xpaths-tp26836075p26836075.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top