Lee Timmins
2018-05-01 16:08:27 UTC
I have the following types:
public class Entity {
public int Id { get; set; }
public IDictionary Attributes { get; set; }
}
public class Category : Entity {
...
}
public class ProductCategory : Category {
...
}
The Category and ProductCategory types are mapped to separate tables and
the "Attributes" property is mapped in code when the session factory is
created.
I use the "Attributes" collection to add additional fields to my tables
without changing the types. This has always worked great but I have a case
where I'd like to have an additional field in the Category table and an
additional field in the ProductCategory table.
I was wondering if this is possible? Also please let me know if you'd like
me to share more code.
Thanks
public class Entity {
public int Id { get; set; }
public IDictionary Attributes { get; set; }
}
public class Category : Entity {
...
}
public class ProductCategory : Category {
...
}
The Category and ProductCategory types are mapped to separate tables and
the "Attributes" property is mapped in code when the session factory is
created.
I use the "Attributes" collection to add additional fields to my tables
without changing the types. This has always worked great but I have a case
where I'd like to have an additional field in the Category table and an
additional field in the ProductCategory table.
I was wondering if this is possible? Also please let me know if you'd like
me to share more code.
Thanks
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.