-->
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: Database views
PostPosted: Mon Sep 08, 2003 12:58 pm 
Newbie

Joined: Mon Sep 08, 2003 12:37 pm
Posts: 10
Hi!

I have to select some data from a database view, which has no id column.
Is there any pattern it could be applied in this case. My mapping file contains:

<id type="java.lang.String">
<generator class="assigned"/>
</id>

I have a find class with a static method for the query:

public static List findxxx(Session session,String filterVal) throws SQLException, HibernateException
{
return session.find("from package.class where filterCol='"+filterVal+"'");
}

The query built contains reference to the id column, too, so the sql statement can not be executed( i don't want to use "select table.column...." returning Object[]).

Any suggestions?


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.