-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Order resultset
PostPosted: Tue Jan 09, 2007 5:10 am 
Newbie

Joined: Tue Jan 09, 2007 5:03 am
Posts: 4
Hi,

First of all, i'm sorry for my english, i'm spanish.

I have this mapping:

<class
name="org.jboss.portal.core.impl.role.RoleImpl"
table="jbp_roles">
<cache usage="read-write"/>
<id
name="key"
column="jbp_rid"
type="java.lang.Long">
<generator class="native">
<param name="sequence">user_seq</param>
</generator>
</id>
<property
name="name"
type="java.lang.String"
update="false"
insert="true"
column="jbp_name"
unique="true"/>
<property
name="displayName"
type="java.lang.String"
update="true"
insert="true"
column="jbp_displayname"
unique="true"/>
<set
name="users"
table="jbp_role_membership"
lazy="true"
inverse="true"
cascade="none"
sort="unsorted"
<cache usage="read-write"/>
<key column="jbp_rid"/>
<many-to-many
class="org.jboss.portal.core.impl.user.UserImpl"
column="jbp_uid"
outer-join="false"/>
</set>
</class>

This is a jboss portal's configuration file. And when i select a member and i want to view its roles i need that its roles come ordered by jbp_displayname. How could i do this editing this configuration?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 09, 2007 10:05 am 
Regular
Regular

Joined: Thu Aug 17, 2006 4:50 am
Posts: 55
Location: Mallorca
set element has an order-by attribute that is passed directly to the SQL


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 09, 2007 12:32 pm 
Newbie

Joined: Tue Jan 09, 2007 5:03 am
Posts: 4
Then, if i write order-by="jbp_displayname asc" in the set element should get an ordered result?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.