dircums wrote:
Can't do it this way... cannot save to database since it uses multiple tables.
Error: View or function 'DownloadPackages' is not updatable because the modification affects multiple base tables.
Here is my new mapping, which is against a view called download packages:
Darn, I'm ashamed that I didn't think of using views. It is still possible: if you are using SQL 2000/5 you should be able to build INSTEAD OF triggers to allow modifications to the underlying tables.
Quote:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Narrowstep.Entities" namespace="Narrowstep.Entities">
<joined-subclass name="DownloadPackage" extends="Narrowstep.Entities.Vlip, Narrowstep.Entities" table="DownloadPackages">
... </joined-subclass>
</hibernate-mapping>
The original mapping was just a simple sublass element, but this did not allow me to use extended properties in the other table.
Interesting, I would have thought that you would use the view to pull the "DownloadPackages" columns into the main table and use <subclass> to map.