Maximilian,
Thanks for the continued reponses. As for the DOCUMENT mapping, the
domain object looks like:
public class RptDocumentBase {
public RptDocumentBase() { }
public virtual long DocBaseId { get; set; }
public virtual RptIngestGroup RptIngestGroup { get; set; } //
The GROUP object
}
and the mapping file looks like:
<hibernate-mapping assembly="IcebergDatabaseAccess"
namespace="IcebergDatabaseAccess.Domain" xmlns="urn:nhibernate-
mapping-2.2">
<class name="RptDocumentBase" table="ICEBERG.RPT_DOCUMENT_BASE"
lazy="true" >
<id name="DocBaseId" type="Int64" column="DOC_BASE_ID">
<generator class="sequence">
<param name="sequence">ICEBERG.SEQ_RPT_DOCUMENT_BASE</param>
</generator>
</id>
<many-to-one name="RptIngestGroup" column="INGEST_GROUP_ID"/>
...........
The updates are using the NHibernate "Update" command where I pass in
the object (ie the RptIngestGroup object). As far as the session
goes, I found out early on that I had to use the same session that was
used to query for the data if I wanted to update the data. So, yes, I
am using the same session. In the case that I have, I have only
updated the in-memory DOCUMENT object from GROUP 1 when I go to do the
NHibernate "update" of GROUP 2. When looking at the output console,
NHibernate shows an UPDATE command for my DOCUMENT, along with toehr
UPDATE commands concerning any DOCUMENT objects that were part of
GROUP 2. Again, there is nothing that links my DOCUMENT to GROUP 2.
It is almost as if NHibernate checks everything it got back from the
query to see if any of the objects are different, regardless if they
are attached to the object being sent in for the update.
- Peter
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.