On Thu, 30 Dec 2004 18:35:59 -0800 (PST), Rajan Gupta <[EMAIL PROTECTED]> wrote:

I did not understand the response, can u help elaborate.
Thanks in advance

eh ? I don't understand what is not to understand ,)

You can execute that query with createSQLQuery as long as you return
entitities.

You can map what you want to a table (as long as you know it's name), and
that might be hard for temporary tables (but you can).

These are the things you can do with hibernate (go read the docs about createSQLQuery).

If that is not enough then use native JDBC, this is one of the things that it's very
capable of. Creation of temporary tables is not something that fit well into ORM - use
JDBC.


And besides, this is not the user forum - so please go back to the user forum with this one.

/max

Rajan
--- Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

On Thu, 30 Dec 2004 11:10:58 -0800 (PST), Rajan Gupta
<[EMAIL PROTECTED]> wrote:

> Hello!
> We have a scenario where the user can select multiple employeeID's
that
> we need to show line items on in one shot. The number of items in
the
> selection could possibly be 1000's. To execute such a query, we
would
> have to use an IN clause e.g.
> SELECT name, date, salary FROM EMPLOYEE WHERE
> empID IN (x,y,z..........)
>
> Now the IN length of the SQL will become very large & many
databases
> have limits on the SQL statement length. We are using a temporary
table
> to store the use selection & then we do a join against the
temporary
> table & the EMPLOYEE table to get our results back.
>
> Can we do this using Hibernate? Are there any plans to support such
a
> functionality?
>

Do that query ? Yes, just map the temporary table if possible or just
use
createSQLQuery() to execute it.

/max

> Thanks
> Rajan
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well,
almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> hibernate-devel mailing list
> hibernate-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel



--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com




__________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250



-- Max Rydahl Andersen callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com


------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to