Hi Alex,

first of all, thank you for having put your effort helping me to solve
this problem.

On Wed, May 18, 2011 at 6:20 PM, H.Alex <[email protected]> wrote:
[cut]

The solution you suggested is the same I adopted, anyway I should
search for "something more". The <any> type mapping asks for all the
entities to have the same ID type (which is what I actually have),
anyway, as I'm always force to work in a scenario with a strong legacy
(i.e. messy db schemes or customers which expose you only some views
not even in 1NF or without any primary key) I need to have a sort of
"failover strategy". :-)
In the very first snippet I posted, it was:

class Employee { String Id { get; } }
class Friend {
  Int32 Id { get; }
  Employee Owner { ... }
 } //an Employee's friend

which is the copy of a real scenario I had to deal with a couple of
months ago (big pain in the arse). So I was thinking about having an
additional column to use the any type mapping but standing on what you
(and others) suggested me, maybe the best thing to do is to add a
surrogate ID of a GUID type and keep on being happy. :-)

Thanks again and have a nice day,
Giulio

--

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to