[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
[eclipselink-users] [MOXy] overriding mapped xpaths in inheritance	hierarchy
 | 
Hi,
Given these classes:
public class Parent {
    String field1;
}
public class Child extends Parent {
    String field2;
}
I know that if I *don't* set up a class mapping for "Parent", I can create a
class mapping for "Child" that defines attribute mappings for both "field1"
(the attribute belonging to the Parent) and "field2" (the attribute
belonging to the Child).
Now what if I:
1.  Set up a class mapping for "Parent" that has an attribute mapping for
"field1" set to an xpath of "foo/text()"
2.  Set up a class mapping for "Child" with an "inheritance policy" for
"Parent", and define attribute mappings for "field1" and "field2".  The
xpath for "field1" is "bar/text()".
What happens in that case?  Does the Child's mapping for "field1" override
the mapping defined in Parent?  Or is it ignored?  Or does this cause an
exception?  
I could probably guess by doing some trial and error, but I'd like to know
what the expected behavior is (especially since there are multiple versions
of EclipseLink now :).
Thanks!
--Polly
-- 
View this message in context: http://old.nabble.com/-MOXy--overriding-mapped-xpaths-in-inheritance-hierarchy-tp26897606p26897606.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.