openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: Metamodel generates ListAttribute for arrays instead of SingularAttribute
Date Wed, 06 Jul 2011 14:48:26 GMT

  Always good of you to provide a context for a topic.

  The spec defines 'collection-valued attribute' with lot of words
essentially meaning anything that implements java.util.Collection (or
java.util.Map). But the problem with such definition based on syntax (i.e.
it implements so-and-so interface) versus on semantic (i.e. a collection is
container of elements) can come to light in the following if we adhere to
public class Bar {}

public class Foo {
   private Bar[]       a;
   private List<Bar> b;

would make attribute a and b treated quite differently. 

That arrays and list are semantically similar shows up in Java language via
Arrays.asList() or List.toArray() methods -- List and Array are fungible. It
is JPA, that does not recognize that fact well. 

What does Dali do for an attribute like 'a' as in above example?


View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message