You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Fluent NHibernate
I have a fluent mapping case and according to documentation the only
was i found is to use ReferencesAny().
But again according to documentation i need to use referencesany in
special cases.
Is there a way to achieve this without using referencesany() ?
(I trimmed down fields to make myself clear)
public BaseEntity()
{
public Id { get;set;}
...
}
public Folder() : BaseEntity....
public Contact() : BaseEntity ..
public Account() : BaseEntity ...
public SharingRecord()
{
public Id { get;set;}
public BaseEntity SharedEntity { get;set;}
public ShareLevel Level { get;set;}
public User User { get;set;}
...
}
Folder, Contact and Account are different tables. SharingRecord's
parent can be any of them.
Thanks in advance.
mynkow
unread,
Aug 29, 2011, 5:31:04 PM8/29/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to fluent-n...@googlegroups.com
I was in this situation many times. In 99% I use 1 table with discriminator. If I fall to the 1% then I always think that something smells in my design. That is why I have only 1% with Any mapping. If you cant redesign your code or put your entities in 1 table then you can use Any mapping. Remember that you cannot use FK with Any.