Unfortunately, no.
Meanwhile, thanks for the reply.
I unfortunately have this situation.
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>
<class name="Pippo.web.entities.Contatti" table="VW_CONTATTI">
id> column="IDCONTATTO" name="Idcontatto" type="int">
<generator class="sequence">
<param name="sequence"> SEQ_IDCONTATTO </ param>
</ Generator>
</ Id>
<property column="CAP" generated="never" lazy="false" name="Cap" type="string"/>
<property column="COGNOME" generated="never" lazy="false" name="Cognome" type="string"/>
<property column="DATA" generated="never" lazy="false" name="Data" type="date"/>
<property column="IDRUBRICA" generated="never" lazy="false" name="Idrubrica" type="int"/>
<property column="NOME" generated="never" lazy="false" name="Nome" type="string"/>
<property column="VIA" generated="never" lazy="false" name="Via" type="string"/>
<property column="PROPRIETARIO" generated="never" lazy="false" name="Proprietario" type="string" insert="false" update="false" />
<sql-insert> insert into CONTACTS (ZIP, LAST NAME, DATE, IDRUBRICA, NAME, STREET) VALUES (?,?,?,?,?,?) </ sql-insert>
<sql-update> update CONTACTS September CAP =?, SURNAME =?, DATA =?, IDRUBRICA =?, NAME =?, VIA =? where ContactID = </ sql-update>
<sql-delete> delete from CONTACTS where ContactID = </ sql-delete>
</ Class>
<hibernate-mapping>
In particular, look at this line:
Code:
<class name="Pippo.web.entities.Contatti" table="VW_CONTATTI">
As you can see the table reference is VW_CONTATTI, which actually shows a view of the database, not the table CONTATTI. In the view I have additional fields that are not in the table CONTATTI, but that are read from other tables related to contacts (example PROPRIETARIO is read from a table called RUBRICA).
Consequently my Contacts object must contain the PROPRIETARIO property, but this property should not be considered in persistence operations.
I hope I was clear. I'm new to this world (I would not write bestiality) :-)