-->
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: does hibernate support database view
PostPosted: Tue Aug 12, 2008 10:33 am 
Newbie

Joined: Tue Aug 12, 2008 10:17 am
Posts: 1
hi everybody

i havve a problem i have a view in my db. i created the mapping file with table name as view name and have mapped the appropraite fields ...


when i execute my query which fetches data from the view i am not able to return anything . it returns size 0.

but while compiling i dont get any error

my sample hbm.xml looks like this

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.samplebean" table="view1">
<composite-id>
<key-property
name="id"
type="java.lang.Long"
column="LOGINID"
/>
<key-property
name="date"
type="java.util.Date"
column="DATE"

/>
</composite-id>

<property name="firstname" type="java.lang.String" column="FIRSTNAME" />
<property>
----
</property>
</class>
<hibernate-mapping>

i want to know why i am not able to return anything from query...


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.