Writing only to public schema with Document Hierarchy #2300
Replies: 2 comments
-
You need to specify the database schema name only at configuration time. You cannot do that at runtime, or at least that will not be honored. Try this:
|
Beta Was this translation helpful? Give feedback.
-
@jeremydmiller Thanks for the answer. But this is my case where I think it would be beneficial: I have a master entity (Container) with lists of "sub entities" (Nodes). Now, I want to store every Container in its own schema (created dynamically - it works already). NodeModels (non-event documents) logically are bound with Containers, so I wanted to store these documents also in the dynamically created schema. |
Beta Was this translation helpful? Give feedback.
-
Hello. I have the following test classes:
I want to store NodeModel1 and NodeModel2 in one table using Document Hierarchies. Additionally, I intend to store the classes in different (already created) schemas, not the public one. Here is part of my repository:
When I tried to store NodeModel1 and NodeModel2 classes with no configuration, I got an error:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown subclass type 'EasyWiseVP.Nodes.NodeModel1' for Document Hierarchy EasyWiseVP.Nodes.NodeModel')
So I added the following configuration:
Now, I don't have the error, but the classes are always stored in the public schema. When I try it for TestModel class (with no hierarchy), changing the schema works.
What can I do to alter between schemas also having the hierarchies? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions