db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: Annotations for embedded Key, Value, and Element
Date Thu, 19 Jul 2007 06:33:12 GMT
On 19 July  2007, Craig L Russell wrote:
> Hi Andy,
>
> On Jul 18, 2007, at 10:09 PM, Andy Jefferson wrote:
> > Hi Craig,
> >
> >>>> 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
> >>> <collection embedded-element="...">
> >>
> >> 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/
> > @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"
> >
> >> 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
>
> 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 
is, the patch on the JIRA. The checked in version cant do it, and since it 
was ORM we (JPOX) never worked through that use case.



-- 
Andy  (Java Persistent Objects - http://www.jpox.org)

Mime
View raw message