In response to my own question:

I found, buried near the bottom of the JPA spec, the section on the
@MapKey annotation, and think that I'd be better off implementing
another entity for this purpose rather than relying on the default
behavior of the java.util.Map.  In addition to a key, I need to map
TWO values, so it makes little sense to use a Map.

Cheers,
--
Alex






On Dec 30, 2007 6:12 PM, Alexander Saint Croix
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm curious--for a simple Map field like the following:
>
> private Map<String, String> m = new HashMap<String, String>();
>
> What would be the best way to annotate this?  I'm getting odd errors
> with a simple @OneToMany annotation.
>
> Cheers, and once again--thank you guys for the amazing job in 2007--I
> eagerly await what 2008 will bring.
>
> Regards,
> --
> Alexander Saint Croix
> .
>

Reply via email to