Open tospie opened 10 years ago
I would also add that ECA should not contain persistence-specific "handlers", internal/private constructors and should not replace types with interfaces (e.g. Dictionary -> IDictionary). One should rather use ICompositeUserType and IUserType available in NHibernate for custom handling of user types.
It seems that NHibernate is not flexible enough for our needs. We agreed to change to plain SQL queries to be able to exercise more control over the database. Other ideas were to add Finalize
method into IPluginInitializer
to allow plugins like Persistence
to shut down gracefully (store remaining updates) instead of being terminated whenever main thread exists as it's now. Finally, we should store entire components instead of individual attributes to avoid inconsistencies... however current interface to the Domain Model does not allow Persistance to determine whether component state is final or not.
Unit Tests of Persistence Plugin need re-design. The current way the tests work is more testing against the correct behavior of the NHibernate Framework, not the functionality of persistence itself.
To solve also #20, one should introduce a mock database and test against the persistence plugin's interface, instead of testing against the NHibernate functions.