I believe the problem is that addAscendingOrderByColumn() is expecting a
full table/column name, but the User and UserPeer abstraction classes do not
include the table name (intentionally, I think).

Try
addAscendingOrderByColumn(UserPeer.getFullColumnName(UserPeer.USERNAME)). I
haven't tried this myself (we use TurbineUserPeer.USERNAME, which works but
is not the right way to do it), but it looks like the getFullColumnName()
method was created to solve this issue.

Kevin

> -----Original Message-----
> From: Will Glass-Husain [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 11:52 AM
> To: Turbine Users List; [EMAIL PROTECTED]
> Subject: RE: Sorting a list of users -- exception
> 
> 
> Hi,
> 
> Thanks for the note.  You're right, should have tried 
> UserPeer.USERNAME.
> Tried again, still gave the same error.  Possible bug?
> 
>               Criteria crit2 = new Criteria();
>               crit2.addAscendingOrderByColumn(UserPeer.USERNAME);
>               User[] UserList = TurbineSecurity.getUsers(crit2);
>               context.put("UserList",UserList);
> Thanks.
> 
> WILL
> 
> -----Original Message-----
> From: Colm McCartan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 10:22 AM
> To: Turbine Users List
> Subject: Re: Sorting a list of users -- exception
> 
> 
> 
> 
> Will Glass-Husain wrote:
> 
> > Hi,
> >
> > I tried to put a sorted list of users in my Velocity 
> context, and got an
> > exception
> >
> >   Criteria crit2 = new Criteria();
> >   crit2.addAscendingOrderByColumn(User.USERNAME);
> 
> 
> Are you sure you meant this and not UserPeer.USERNAME?
> 
> 
> 
> colm
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

Reply via email to