KPixel wrote:
This is interesting. Can you give more details about that?
Well, for example, I have decided that by default, all proeprties of persistent class are stored. If I want a property to be non-stored, I add attribute for that.
Also, all my classes use same equally named ObjectId and version properties, so I do not need define those with attributes.
Third, I always use nosetter.pascalcase-m-underscore as access modifier, so it is hardcoded into hbm writer.
And lazy loading.
Also, I have decided quite certain way to define collections, so my typical IList looks like
Code:
[InverseRelation("Parent", RelationType = RelationType.Bag)]
public virtual IList<SubItem> SubItems
So, most of the "improvements" are depending on my coding style, and not usable for general audience. But they help me to keep code files a bit cleaner..
KPixel wrote:
Do you see some places where NHibernate.Mapping.Attributes can be improved to better support your "restricted way"?
I haven't analyzed what and how the NHibernate.Mapping.Attributes provides. I looked at them briefly when I started using NHibernate (version 0.9.x I think), but decided that they required too much details that were constant in my implementation.
Gert