nhibernate-envers
nhibernate-envers copied to clipboard
Extend modified flags to support track changes within components
One question, I have mapped the fields this way:
Component(x => x.RentSearchParameters, m => { m.Map(x => x.MinPrice).Column("precio_min_alquiler").Nullable(); m.Map(x => x.MaxPrice).Column("precio_max_alquiler").Nullable(); m.Map(x => x.ApproxPosition).Column("posicion_aproximada_alquiler").Nullable(); m.Map(x => x.Timing).Column("timing_alquiler").Nullable(); m.Map(x => x.Step).Column("step_alquiler").Nullable(); });
Is it possible to audit them separately?
precio_min_alquiler - MinPrice_mod precio_max_alquiler - MaxPrice_mod posicion_aproximada_alquiler - ApproxPosition_mod ...
instead of
precio_min_alquiler precio_max_alquiler posicion_aproximada_alquiler RentSearchParameters_mod ...
Sorry, dont understand. What do you mean with "seperately"?
Also, is this a bug? Or is it a question how to use/configure Envers? If it is the latter, please post it here instead, http://groups.google.com/group/nhusers.
@RogerKratz Is a question about use/configure I will ask in the community. thank you
@RogerKratz I have asked in the community for 10 days but I have not received an answer. Could you help me with the previous question?
Component(x => x.RentSearchParameters, m => { m.Map(x => x.MinPrice).Column("precio_min_alquiler").Nullable(); m.Map(x => x.MaxPrice).Column("precio_max_alquiler").Nullable(); m.Map(x => x.ApproxPosition).Column("posicion_aproximada_alquiler").Nullable(); m.Map(x => x.Timing).Column("timing_alquiler").Nullable(); m.Map(x => x.Step).Column("step_alquiler").Nullable(); });
and I get this result:
... precio_min_alquiler precio_max_alquiler posicion_aproximada_alquiler RentSearchParameters_mod
Is it possible to configure nhibernate.envers so that each field has its corresponding field that indicates that it has been modified?
precio_min_alquiler - MinPrice_mod precio_max_alquiler - MaxPrice_mod posicion_aproximada_alquiler - ApproxPosition_mod ...
Sorry, dont understand. what do you mean with "and I get this result"? Result of what? And what is "posicion_aproximada_alquiler"?
Do you want to have custom names of your property modification flags? Or do you want more/fewer flags?
How does your envers configuration look like?
Hi @RogerKratz
I need to have a mod flag for each field, but with FluentNHibernate.Mapping.ComponentPart I only get one mod flag for all fields.
For example, this is my ClassMap

and envers generate one mod flag for all fields

and i need to generate a mod flag for each field with the FluentNHibernate.Mapping.ComponentPart, it's possible?
Ah, I see. Didn't even remember that it worked that way (I don't use modified flags myself).
Modified flags is a direct port from Hibernate's envers version. Found this issue there, HHH-10859, so if I understand you correctly, I'm afraid what you want to do isn't possible ATM. I personally don't have the time trying to fix this, at least not until it's impl in Hibernate so it's easy to port. You are of course welcome to create a pull request and provide a fix yourself.
reopening the issue now when when it's clear what it's about
Hi @RogerKratz thank you so much for help me. I will wait for it to be fixed.