﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on NHibernate Mapping - &lt;join/&gt;</title><description>Scotty,
  
NH isn't trying to generate the FK on the fly, it is complaining because you have an invalid definition. You must have the same number of columns on both.
</description><link>http://ayende.com/3961/nhibernate-mapping-join#comment10</link><guid>http://ayende.com/3961/nhibernate-mapping-join#comment10</guid><pubDate>Thu, 30 Apr 2009 16:25:17 GMT</pubDate></item><item><title>scotty commented on NHibernate Mapping - &lt;join/&gt;</title><description>Guys,
  
  
We're trying to use the 
&lt;join condition in a table that has a composite primary key.  Outwith the composite key in that table we have another field which is used as a foreign key onto a lookup table.
  
  
Nhibernate complains with the classic 'Foreign key does not have the same number of columns as primary key...' error, when using the 
&lt;join onto the lookup table.
  
  
We've even taken off the foreign key and tried this, but it looks like Nhibernate is dynamically creating a foreign key at runtime, and throwing the error.
  
  
All we're doing is effectively an inner join onto a lookup table, from a table with a composite primary key.
  
  
Any ideas?
  
  
We know creating a surrogate key will solve this, but we're loathe to go down that route.
  
  
thanks.
&gt;</description><link>http://ayende.com/3961/nhibernate-mapping-join#comment9</link><guid>http://ayende.com/3961/nhibernate-mapping-join#comment9</guid><pubDate>Thu, 30 Apr 2009 14:26:23 GMT</pubDate></item><item><title>tolly commented on NHibernate Mapping - &lt;join/&gt;</title><description>Thanks, Ayende :) Hopely, I'll find the way.
  
  
It's a greate blog, i've learnt a lot of new things about NHibernate, thanks
</description><link>http://ayende.com/3961/nhibernate-mapping-join#comment8</link><guid>http://ayende.com/3961/nhibernate-mapping-join#comment8</guid><pubDate>Tue, 21 Apr 2009 08:26:40 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate Mapping - &lt;join/&gt;</title><description>tolly,
  
Please follow this up in the mailing list
</description><link>http://ayende.com/3961/nhibernate-mapping-join#comment7</link><guid>http://ayende.com/3961/nhibernate-mapping-join#comment7</guid><pubDate>Tue, 21 Apr 2009 07:38:39 GMT</pubDate></item><item><title>tolly commented on NHibernate Mapping - &lt;join/&gt;</title><description>In the post about {dynamic-component/} i've asked about the way to store key-value pair in detail-table. 
[ayende.com/.../...pping-ltdynamic-componentgt.aspx](http://ayende.com/Blog/archive/2009/04/11/nhibernate-mapping-ltdynamic-componentgt.aspx#feedback)  
  
I'd like to solve inhertance problem using this key-value princniple. see picture: 
[tweakers.net/.../full.jpg](http://tweakers.net/ext/f/uWjgoN8WWxwspZKQjxYq0NSf/full.jpg)  
  
I want that NHibernate dynamically creates subclasses' attributes using detail-table with key-value pair, where key is the name of the attribute and the value is the value. 
  
Is it possible with NHibernate?
  
  
I prefer this solution over the standard ones (like table-per-subclas or table-per-concrete-class), because i have more than 80 subclasses with three hierarchical levels and all with their specific attributes.
  
  
Thanks in advance
  
</description><link>http://ayende.com/3961/nhibernate-mapping-join#comment6</link><guid>http://ayende.com/3961/nhibernate-mapping-join#comment6</guid><pubDate>Mon, 20 Apr 2009 14:30:36 GMT</pubDate></item><item><title>Remmus commented on NHibernate Mapping - &lt;join/&gt;</title><description>Great series of posts.
</description><link>http://ayende.com/3961/nhibernate-mapping-join#comment5</link><guid>http://ayende.com/3961/nhibernate-mapping-join#comment5</guid><pubDate>Mon, 20 Apr 2009 08:50:34 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate Mapping - &lt;join/&gt;</title><description>Jan,
  
Yes, that is what I meant.
</description><link>http://ayende.com/3961/nhibernate-mapping-join#comment4</link><guid>http://ayende.com/3961/nhibernate-mapping-join#comment4</guid><pubDate>Mon, 20 Apr 2009 08:16:04 GMT</pubDate></item><item><title>Ayende Rahien commented on NHibernate Mapping - &lt;join/&gt;</title><description>Evgeny,
  
I don't see the typo
</description><link>http://ayende.com/3961/nhibernate-mapping-join#comment3</link><guid>http://ayende.com/3961/nhibernate-mapping-join#comment3</guid><pubDate>Mon, 20 Apr 2009 08:10:12 GMT</pubDate></item><item><title>Jan Van Ryswyck commented on NHibernate Mapping - &lt;join/&gt;</title><description>The mix &amp; match inheritance strategy you mentioned, is it something like this?
  
  
[knol.google.com/.../11#8](http://knol.google.com/k/fabio-maulo/nhibernate-chapter-8/1nr4enxv3dpeq/11#8)(2E)1(2E)3(2E)(C2)(A0)Table_per_subclass(2C)_using_a_discriminator
  
  
Thx
  
  
PS: I'm learning a lot from this article series. Thx for spreading the knowledge.
</description><link>http://ayende.com/3961/nhibernate-mapping-join#comment2</link><guid>http://ayende.com/3961/nhibernate-mapping-join#comment2</guid><pubDate>Mon, 20 Apr 2009 07:49:52 GMT</pubDate></item><item><title>Evgeny Shapiro commented on NHibernate Mapping - &lt;join/&gt;</title><description>It let us create a =table per hierarchy= that store all the extra fields on another table, for example. That significantly reduce the disadvantage of using a =table per hierarchy= or table per subclass...
  
  
There's a typo.
  
  
Beside this, the post series is awesome :).
</description><link>http://ayende.com/3961/nhibernate-mapping-join#comment1</link><guid>http://ayende.com/3961/nhibernate-mapping-join#comment1</guid><pubDate>Mon, 20 Apr 2009 03:00:16 GMT</pubDate></item></channel></rss>