-->
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.  [ 1 post ] 
Author Message
 Post subject: Work with excluding set in Hibernate/MySQL
PostPosted: Thu Nov 29, 2007 12:15 am 
Newbie

Joined: Fri Oct 26, 2007 1:10 pm
Posts: 3
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.2

Mapping documents:

Name and version of the database you are using:
MySQL 5.0.41

Debug level Hibernate log excerpt:

Dear Team,

This question may be best in Hibernate forum. I use appfuse 1.9.4 with WW2. My problem is,

There is City field in user table, some users are in big cities like LA, San Francisco and others in not well-known cities. I also have a city table containing records of most big cities with its state.
On JSP page, I want list user by city: LA, San Francisco, Other (all other cities in CA).

How can I create a map/set in Hibernate?
1) Get set1 of city list in the state from city table
2) Get all users whose city is *not* in above set1

I think Hibernate or MySQL should have a way, but I don't know. Maybe one way is to ask:)
Thanks a lot in advance!
-Bruce


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

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.