[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] [MOXy] overriding mapped xpaths
|
Hi Blaise,
Thanks for the quick response and workaround suggestions. I'll take a look
at that. I have created the enhancement request here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=298220
Thanks!
--Polly
Blaise Doughan wrote:
>
> Hi Polly,
>
> This is one that I have been thinking about for a while. This type of
> support is available in object-to-relational EclipseLink for
> AggregateObjectMapping. Could you enter an enhancement request for this
> one as well. One of our focus areas for EclipseLink 2.1 is community
> entered bugs, so I want to sure your enhancements are logged with a
> non-committer email address so that they are ranked accordingly.
>
> As a work aroud you could use a converter strategy (similar to the one
> discussed below), or an XMLTransformationMapping.
>
> Converter Example
> http://forums.oracle.com/forums/message.jspa?messageID=3976208#3976208)
>
> -Blaise
>
> polly.c.chang wrote:
>> 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
>>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>
--
View this message in context: http://old.nabble.com/-MOXy--overriding-mapped-xpaths-tp26836075p26848702.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.