Nice work!
When querying audited entities, quite often both entity type _and_ revision type is involved. Revision number is mandatory on revision type and the way you add this to the query by adding an extension method is good enough if only querying for revision number. However, when having a custom revision type (which I guess most projects have) with, for example, ModifiedBy and ModifiedAt you often want to make queries based on these properties.
To get some type safe way to make queries, I think the revision type needs to be included in the query somehow.
<<
This type information could be parsed from Envers (?) but I donot know enough about Envers. Are types dynamically generated at startup?
>>
I’m not sure I understand but if you ask what CLR type audited entities are mapped to, it is simply an IDictionary. No new CLR types are created for audited entities (except for their collection proxies). When IntegrateWithEnvers is called on NH’s Configuration object, new mappings are added for each mapped entity. These mappings don’t have any class mapped to them (in hbm mapping, the class element doesn’t have any name attribute – only entity-name).
When envers query API is called, this data/dictionary is “transformed” into entity objects (and, possibly, a revision entity).
/Roger
--
---
You received this message because you are subscribed to the Google Groups "nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
nhibernate-develo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to nhibernate-development+unsub...@googlegroups.com.
Hi,
Is it available on some public repo somewhere?
/Roger
From: nhibernate-...@googlegroups.com [mailto:nhibernate-...@googlegroups.com] On Behalf Of Peter Schojer
Sent: den 18 december 2015 09:29
To: nhibernate-development <nhibernate-...@googlegroups.com>
--
---
You received this message because you are subscribed to the Google Groups "nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhibernate-develo...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to nhibernate-development+unsub...@googlegroups.com.