Hi Roger,
So I think I've made progress.
1. I created a new issue at the URL you gave me (the issue is NHE-139).
2. I setup a bitbucket account and forked the Envers project (wasn't sure 
what the best practice was for naming the fork so I simply called it 
NHibernate.Envers NHE-139)
3. I cloned the fork I created to my local machine

I have a couple of quick questions in terms of best practices:
1. You mentioned I should create a test that fails without my fix and 
include a fix that makes my new and all old tests pass.  Does that mean I 
should create two branches in my fork.  The first branch I add a failing 
test and the second branch I have the same test but with the fix included?  
Wasn't sure how to create a failing test and a fix in the same fork since 
adding the fix would cause the test to pass.

2. Within the Visual Studio solution what is the best place to put my unit 
test?  Should I create a new folder under the NHibernate.Envers.Test 
project called "NHE-139" and put my unit test and hbm mapping file example 
in that folder?

3. Finally, when I write my unit test should I be inheriting from the 
TestBase (full class name = NHibernate.Envers.Tests.TestBase) class?

Thanks so much.

On Wednesday, March 11, 2015 at 5:34:25 AM UTC-4, Roger wrote:
>
> Please report your issue here, https://nhibernate.jira.com/projects/NHE, 
> where you include minimal mapping and configuration to reproduce your 
> problem. 
>
> (
> If you want to be more ambitious, add a pull request with a failing test.
> If you want to be even more ambitious, add a pull request with a test that 
> fails without your fix and also include a fix that makes your new and all 
> other old tests to pass.
>
> If you are uncertain how to contribute with code to an open source 
> project, the how-to-guide for NH Core is quite good - 
> https://github.com/nhibernate/nhibernate-core/blob/master/CONTRIBUTING.md
> Some things differ but the principle is the same for Envers.
> )
>
> /Roger
>
> On Wednesday, March 11, 2015 at 12:25:08 AM UTC+1, Devin Michael wrote:
>>
>> I think I might have solved the issue.  On line 275 of the 
>> AuditEventListener class there's the following line of code:
>>
>> var rd = 
>> VerCfg.EntCfg[entityName].GetRelationDescription(referencingPropertyName);
>>
>> Basically, my object model looked something like this:
>>
>> ClassA (base class)
>> ClassB (superclass)
>>
>> When the GetRelationDescription was being called for entityName = ClassB 
>> it was returning NULL for a child bag collection that existed in ClassA.  
>> So ClassB implemented the bag collection but not directly.  Instead the bag 
>> collection was actually a property of it's subclass ClassA.  So I simply 
>> added a few lines of code below that line that will check the classes the 
>> entity inherits from if rd is initially NULL.
>>
>> I've attached a screenshot highlighting the coding change I made.
>>
>> I'm not sure if this is a true fix that doesn't break anything but it 
>> seems to have resolved the issue I was having with no ill effects so far.
>>
>> On Monday, March 9, 2015 at 12:26:09 PM UTC-4, Devin Michael wrote:
>>>
>>> I have just started using NHibernate Envers and I'm running into an 
>>> issue when saving certain objects when a bag collection associated with the 
>>> object has been altered.  The problem is visible within the attached image.
>>>
>>> I'm using NHibernate v4.0.0.4000 and Envers version 2.0 GA.  I found a 
>>> bug report related to prior versions of Envers 
>>> https://nhibernate.jira.com/browse/NHE-136?jql=project%20%3D%20NHE but 
>>> that bug was reportedly fixed in version 2.0.
>>>
>>> If anyone has any insights on what might be causing this issue I'd 
>>> greatly appreciate it.
>>>
>>> Thank you,
>>> Devin
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to