Hi!
Someone know how I can work with hibernate and a view?
can I handle i view like i table?
what I have to set at the mapping file at primary key because the view hasnt someone?
code snippets:
mapping file:
Code:
<?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 package="at.pcd.wam.technologie.persistence.model">
<class name="at.pcd.wam.technologie.persistence.model.LocationPortalModel" table="V_STANDORT_PORTAL" >
<!-- primary key -->
<id name="id" type="string" column="E_30021_DBK">
<generator class="increment"></generator>
</id>
<property name="dbk" type="string" column="E_30019_DBK"></property>
<property name="district" type="string" column="BEZIRK"></property>
<property name="boroughNumber" type="integer" column="GEMEINDE_NR"></property>
</class>
</hibernate-mapping>
--> table equals view name?
--> what I have to do with the primary key?
best regards