Re: JPA 2.0 development plans...

2008-10-24 Thread Ignacio Andreu
+1 for the new branch On Fri, Oct 24, 2008 at 9:09 PM, Michael Dick <[EMAIL PROTECTED]>wrote: > Hi all, > > I haven't heard any screaming so I'm going to go ahead and create the > branch > later today (read this is your last chance). > > -mike > > On Wed, Oct 1, 2008 at 3:08 PM, Michael Dick <[EM

Re: mapping Set

2008-10-24 Thread Michael Dick
Hi, I think the PersistentCollection annotation [1][2] is what you're looking for. [1] http://openjpa.apache.org/builds/latest/docs/javadoc/org/apache/openjpa/persistence/PersistentCollection.html [2] http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_meta_jpa_persistent_co

Re: ordered Lists, with list position in join table

2008-10-24 Thread Michael Dick
Glad to help. I think it will work, I didn't use @JoinTable in my test though. -mike On Fri, Oct 24, 2008 at 3:48 PM, Fernando Padilla <[EMAIL PROTECTED]> wrote: > nice :) > > so I use @ManyToMany, and still use the @JoinTable, but simply add the > @OrderColumn instead of the @OrderBy? > > > Mic

Re: ordered Lists, with list position in join table

2008-10-24 Thread Fernando Padilla
nice :) so I use @ManyToMany, and still use the @JoinTable, but simply add the @OrderColumn instead of the @OrderBy? Michael Dick wrote: In that case the OpenJPA OrderColumn annotation should work. import org.apache.openjpa.persistence.jdbc.OrderColumn; @Entity public class FLeague extends

Re: ordered Lists, with list position in join table

2008-10-24 Thread Michael Dick
In that case the OpenJPA OrderColumn annotation should work. import org.apache.openjpa.persistence.jdbc.OrderColumn; @Entity public class FLeague extends HBaseIdCreateTime { @ManyToMany @OrderColumn(name="DRAFTORDER_ORDER") private List draftOrder; } hth -mike On Fr

Re: ordered Lists, with list position in join table

2008-10-24 Thread Fernando Padilla
:( it's not. the sort column lives purely in the relational join table, and is not associated with any fields in the target entity. Michael Dick wrote: Hi, If the sort column is a mapped field in the target entity you can use "vanilla" JPA. Something like this should work for you : @Enti

Re: JPA 2.0 development plans...

2008-10-24 Thread Michael Dick
Hi all, I haven't heard any screaming so I'm going to go ahead and create the branch later today (read this is your last chance). -mike On Wed, Oct 1, 2008 at 3:08 PM, Michael Dick <[EMAIL PROTECTED]>wrote: > Hi, > > +1 to creating a new branch for 1.x work. I don't anticipate a 1.3.0 > release

Re: ordered Lists, with list position in join table

2008-10-24 Thread Michael Dick
Hi, If the sort column is a mapped field in the target entity you can use "vanilla" JPA. Something like this should work for you : @Entity public class FLeague extends HBaseIdCreateTime { @ManyToMany @OrderBy("${fieldName} ASC") private List draftOrder; } Replace

mapping Set

2008-10-24 Thread Fernando Padilla
So.. I have a field that I don't konw how to map: private Set relatedAthletes; I think I understand how to relate two entities together, but not sure how to relate an Entity to a Set of "primitive" or Basic data types.

ordered Lists, with list position in join table

2008-10-24 Thread Fernando Padilla
So, again, I'm trying to port from old JDO to new JPA :) And I'm trying to map a List object, where the relational table is storing the position of each element. It looks like standard JPA doesn't want to support this, but I was wondering if OpenJPA had this as an option in some way...: A