|
Home > Archive > Apache JDO Project > July 2007 > Annotations for embedded Key, Value, and Element
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Annotations for embedded Key, Value, and Element
|
|
| Craig L Russell 2007-07-17, 7:11 pm |
| | |
| Andy Jefferson 2007-07-18, 7:11 am |
| > The only thing needed is the Embedded[] embedded() default {} element
> of @Key, @Value, and @Element, replacing the String embedded() that I
> think has no use here.
@Element "embedded" (String) has the same use as=20
<collection embedded-element=3D"...">
=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)
| |
| Craig L Russell 2007-07-18, 1:11 pm |
| | |
| Andy Jefferson 2007-07-19, 1:11 am |
| Hi Craig,
>
> Yes, this is part of the separation of jdo from orm metadata. It
> might make sense to preserve the name of the attributes and put the
> corresponding annotation elements embeddedElement, embeddedKey, and
> embeddedValue into @Field and @Property and then use embedded() for
> mapping.
I disagree on that placement of the other flags, back on to @Field/@Propert=
y.=20
They relate specifically to the element, key, value so keep them on the=20
associated annotation would be my vote. So then it really comes down to=20
namings of the global flag, and the mapping details
1. "embedded", "embeddedMapping"
2. "embeddedElement", "embedded"
> Have you looked at how to do mapping of embedded element, key, and
> value with the current annotations? I might have missed something
> obvious...
Looks fine to me. Should cater for all cases I have immediately to mind
=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)
| |
| Craig L Russell 2007-07-19, 1:11 am |
| | |
| Andy Jefferson 2007-07-19, 7:11 am |
| On 19 July 2007, Craig L Russell wrote:
> Hi Andy,
>
> On Jul 18, 2007, at 10:09 PM, Andy Jefferson wrote:
>
> I couldn't see how to specify embedded mappings at all without the
> proposed new annotations. Can you give an example similar to this one
> using the checked-in version?
Nooooo. What I was meaning is that your proposed way looks fine to me! that=
=20
is, the patch on the JIRA. The checked in version cant do it, and since it=
=20
was ORM we (JPOX) never worked through that use case.
=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)
| |
| Andy Jefferson 2007-07-26, 1:11 am |
| Hi Craig,
> I disagree on that placement of the other flags, back on to
> @Field/@Property. They relate specifically to the element, key, value so
> keep them on the associated annotation would be my vote. So then it really
> comes down to namings of the global flag, and the mapping details
>
> 1. "embedded", "embeddedMapping"
> 2. "embeddedElement", "embedded"
This seems to have been ignored (by the most recent check in) and users can=
no=20
longer specify the equivalent of "embedded-element" on the @Element=20
(similarly embedded-key on @Key, embedded-value on @Value). I would like th=
em=20
reinstated, as per the above proposal.
=2D-=20
Andy =A0(Java Persistent Objects - http://www.jpox.org)
| |
| Craig L Russell 2007-07-26, 7:11 pm |
| |
|
|
|
|