Description
André Luiz Ferreira Dias created an issue — 26th July 2014, 20:13:09:
I have the attached mapping file that is perfectly working on versions 2.1.0 of NHibernate and when I upgrade to the version 3.x.x it stopped to work. I don't know if this is a breaking change, but in my opinion, this behavior should not be different after the version upgrade.
Oskar Berggren added a comment — 26th July 2014, 22:05:35:
Adding links to a number of issues that might be similar.
Oskar Berggren added a comment — 26th July 2014, 22:10:52:
Can you please provide a minimal test case that replicates the problem? You might start with the template at https://github.com/nhibernate/nhibernate-core/tree/master/src/NHibernate.Test/NHSpecificTest/NH0000
André Luiz Ferreira Dias added a comment — 26th July 2014, 22:43:37:
Sorry, now I've attached the POCO files... the test fixture I do not have them
Oskar Berggren added a comment — 26th July 2014, 23:53:40:
I meant that you should write a test case. The classes you attached do help. I had to tweak them and the mapping file a little before it compiled. But a simple case I tried works as expected - the members of the are loaded.
So to proceed on this we would need more information on when and how the situation occurs - how the bag owner is loaded etc. It would be really helpful and speed things up if you could provide a small and self-contained test case that works on 2.1.0 but fails on 3.3.3.
André Luiz Ferreira Dias added a comment — 27th July 2014, 0:40:21:
I don't know if this causes some different behavior, but the method Equals that was overrided on the class ItemNotaFiscal it's implemented a litle bit different on my application, it is exactly like this:
public override bool Equals(object obj) { if (obj == null | !(obj is ItemNotaFiscal)) | return false; if (ReferenceEquals(this, obj)) return true; ItemNotaFiscal passedObj = (ItemNotaFiscal)obj; return (passedObj.NotaFiscal == NotaFiscal) && (passedObj.Produto == Produto); }
That is, it contains a comparison with null in the first conditional of the method, this has anything to do with my problem?
André Luiz Ferreira Dias added a comment — 27th July 2014, 2:02:47:
Forget what I sad, I've tested here and this implementation has nothing to do with my problem, I'll try to create a simple application to simulate the problem and then upload it.
Alexander Zaytsev added a comment — 19th August 2014, 2:54:20:
<~andre.luiz> any news?
André Luiz Ferreira Dias added a comment — 19th August 2014, 3:00:51:
No. I'm still having the mentioned problem... i could not create a sample application, but my scenario it's quite simple, it's just the mapping file attached running on an environment with SQL Server 2012 DBMS.