On May 1, 2011, at 12:27 PM, Patrick Earl wrote:
> In ORMs like NHibernate, there are a few strategies for mapping
> inheritance to SQL.  One of these is "Joined Subclass," which allows
> for the elimination of duplicate data and clean separation of class
> contents.
> 
> With a class hierarchy such as this:
> 
> Pet
> Dog : Pet
> Cat : Pet
> 
> The query to get all the pets is as follows:
> 
> select * from Pet
> left join Dog on Dog.Id = Pet.Id
> left join Cat on Cat.Id = Pet.Id

Since FOR UPDATE seems to be a dead end here...

Is that construct something that NHibernate natively understands? If so, could 
you use Postgres table inheritance instead of joins?
--
Jim C. Nasby, Database Architect                   j...@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to