I have such base type:
and then have descendant type:
But when domain is built, table for type ReleaseSnapshotFile is named FileSystemEntity and not tReleaseSnapshot_Files like i marked with attribute TableMapping. Is this expected behavior? Update: Also i found that if attribute TableMapping is moved to parent type FileSystemEntity, then table is named right (tReleaseSnapshot_Files) but relation association defined by property Childs has table named FileSystemEntity-Childs-FileSystemEntity - it should be name like tReleaseSnapshot_Files_Childs_tReleaseSnapshot_Files or something similar, no? |
InheritanceSchema.SingleTable mode embodies that all types within an hierarchy are mapped to a single table, so TableMapping attribute should be applied to the root of the hierarchy, not to any of its children. As for the second part of the post, it seems that the reported behavior is incorrect and must be fixed. I've opened an issue. I'd add it is incorrect even in the first case: why [TableMapping] makes any effect at all here? And about auxiliary table name mapping: issue 250. TableMapping attribute makes possible to map the entire hierarchy to an arbitrary table (to a table with an arbitrary name). What's wrong in this scenario? He was applying IMO, What is expected to be, if we'll apply different
That's exactly what I'm talking about. Alex, plz, look at my first reply. May be I've misunderstood you comment, so forgive me for that mistake... Well, you wrote "... that must be fixed. I've opened an issue.", but it doesn't touch this problem at all - that's why I wrote ;) I.e. there should be one more issue. Yes, you are right. Thanks for you advertence. |