Question

I'm using RavenDb. I'm storing different objects, but these objects have the same name.

Namespace.Models.X

abstract class A

class B : A
class C : A


Namespace.Models.Y

abstract class D

class B : D
class C : D

Raven is storing both types in the format:

Namespace.Models.X.B as type/1 
Namespace.Models.Y.B as type/2

Is there a way to override the collection name associated with the document? I could change my class names but I'd rather not if possible.

Was it helpful?

Solution

Yes, using:

documentStore.Conventions.FindTypeTagName = type => /* get type name as you wish it */;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top