Matthew Mastracci wrote:
I have a suggestion that might make maintenance easier: you could add custom xml attributes to the nhibernate xsd file that describe how the element can be converted to an attribute. [...]
It could make the maintenance
of NHMA easier, but it will give more work to NHibernate developers :D As the mapping schema evolve very slowly, I don't think that it is worth.
Matthew Mastracci wrote:
I've found a couple of elements that should be added as class/property or assembly attributes as well:
jcs-cache: should be class, property or field, since it can apply at the
class or property level
meta: should be assembly, class, property or field, since it can apply
at the class or property level
import: should be assembly level
query/sql-query: should be assembly level
idbag: should be class level
For <meta> and <jcs-cache>, they can't be class-level because of the way the writers work... (same for <discriminator>)
You can put them on any property of the class (like the identifier)
<import>, <query>, <sql-query> are not supported; IIRC, it is possible to write them in a separated mapping file... (like MyImports.hbm.xml) :?
I will think about this problem and see if I can find a solution.
<idbag> is a kind of collection... I don't understand why you put it here. (a typo ? :D)
Thanks for your feedback :)
Can you tell me if it works as expected? (is there any (minor) problem/side-effect?)