Re: Select For Update and Left Outer Join
| От | Jim Nasby | 
|---|---|
| Тема | Re: Select For Update and Left Outer Join | 
| Дата | |
| Msg-id | 4F418A62-BEB6-4D77-A0F1-B8DF27F211BF@nasby.net обсуждение исходный текст | 
| Ответ на | Select For Update and Left Outer Join (Patrick Earl <patearl@patearl.net>) | 
| Список | pgsql-hackers | 
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 insteadof joins? -- Jim C. Nasby, Database Architect jim@nasby.net 512.569.9461 (cell) http://jim.nasby.net
В списке pgsql-hackers по дате отправления: