RelationalList ordering

3 views
Skip to first unread message

ryan....@gmail.com

unread,
Jul 6, 2006, 12:48:41 AM7/6/06
to jmatter
How is objects in a RelationalList ordered? I am using a
EditableListView in the parent view. When I add items to the list, the
objects are getting re-arranged (Seems to be alpha sorted). I kind of
need an ordered list. Are there ways of annotating relationships to add
constraints (such as ordered). I know underneath hiberante supports
different collection models (Bags, Lists, etc..) but is there a way yet
in jmatter to specify such?

Any ideas?

Ryan

Eitan Suez

unread,
Jul 6, 2006, 9:42:45 AM7/6/06
to jma...@googlegroups.com
if you view a list in tableview, clicking on the table headers (for
columns that represent atomic values) will sort the entries by
that column.

in HBMMaker.java, the class that produces the hibernate mappings,
you'll see that i'm treating lists as hibernate bags.  i've played with
mapping the lists as hibernate lists, which are ordered.  in fact, you'll
see code in HBMMaker commented out that implements list mapping
as ordered lists.

however, hibernate has issues with ordered lists in a bidirectional one-many
relationship.  so i fell back to bags once more.

there's a feature that's not well documented where i specify in my model
the default search field for a type.  this is used by the gui for making
associations.  say that there's a many-to-one between a Talk and a
Speaker.  if i create a new talk, i can start typing the name of the
speaker and a filtered listing will appear for me to pick / set the right
association.  the reason i bring this up is that i can setup something
analogous for list ordering.  in the class file, a piece of metadata that
says "by default, sort the list of talks by topic" or "by default, sort the
list of speakers by first name."

/ eitan
Reply all
Reply to author
Forward
0 new messages