thanks for your suggestions.. but i don't think that using those tools is something i can do right now..
i've been reading tutorials online, mainly Section 1.3 Part 2 of this one:
http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html#tutorial-associations
... and I've come up with something like this (I deleted my site_network_ref domain and xml mapping btw):
I have a networkref domain object (I call it NetworkData), and a corresponding .hbm.xml file that looks like this:
Code:
<class name="domain.NetworkData" table="network_ref"
proxy="domain.NetworkData" dynamic-update="true"
dynamic-insert="true">
<set name="siteIDLink" table="site_network_ref">
<key column="site_id" />
<many-to-many column="network_id"
class="domain.SiteNetworkRef" />
</set>
<property name="subnetIP" type="string" column="subnet_ip" />
<property name="subnetMask" type="string" column="subnet_mask" />
<property name="expirationDate" column="expiration_dtm"
type="date" update="true" insert="true" />
</class>
and then I created a site_ref domain object (I call it Site), and a corresponding mapping that looks like this:
Code:
<class name="domain.Site" table="site_ref"
proxy="domain.Site" dynamic-update="true"
dynamic-insert="true">
<property name="siteType" type="string" column="site_type" />
<property name="wirelessIndicator" type="char" column="wireless_ind" />
<property name="dialupIndicator" type="char" column="dialup_ind" />
<property name="expirationDate" column="expiration_dtm"
type="date" update="true" insert="true" />
</class>
Now if you notice in the first one, I have a set defined, and many to many mapping.. but I dont think this is really what I want (and I dont think I did it right, regardless). Multiple network ID's can be matched to a single site id in the site_network_ref table... so I think I need a many-to-one, but I really don't understand this. I just want one mapping down solid, because I have a lot more of these to go. Thanks again for your help so far!