Table per subclass, using a discriminator mappings with formula in child class error

Description

Mistake in code for mapping collection when using "Table per subclass, using a discriminator" strategy.
Patch is here:

Index: SingleTableEntityPersister.cs
===================================================================
— SingleTableEntityPersister.cs (revision 4894)
+++ SingleTableEntityPersister.cs (working copy)
@@ -652,7 +652,7 @@

//figure out which formulas are needed
List<int> formulaNumbers = new List<int>();

  • int[] formulaTableNumbers = SubclassColumnTableNumberClosure;
    + int[] formulaTableNumbers = SubclassFormulaTableNumberClosure;
    for (int i = 0; i < SubclassFormulaTemplateClosure.Length; i++)
    {
    if (tableNumbers.Contains(formulaTableNumbers[i]))

Environment

None

Attachments

1

Activity

Show:

Alex Zaytsev 
September 8, 2014 at 11:31 AM

Close issues resolved in 3.3.3

Alex Zaytsev 
January 23, 2013 at 4:50 AM

Fixed in 3.3.x ( fce19f392d16a17b3621c4d3113d2690c9a08420 )

Alex Zaytsev 
January 23, 2013 at 4:18 AM

Could not reproduce this issue. Need more details or a test case

Fabio Maulo 
August 4, 2010 at 10:42 AM

again without test.
Thanks for your support, I'm sure you will maintain your custom source of NHibernate.

Anton 
April 13, 2010 at 1:36 AM

Just no formulas at all will be fetched from DB.
With this patch its will be fetched.

If you just look in code, you will find out, that
int[] formulaTableNumbers = SubclassColumnTableNumberClosure;
is gathering COLUMNS information, not FORMULAS, but
int[] formulaTableNumbers = SubclassFormulaTableNumberClosure;
will gather FORMULAS info, as it should.

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created December 10, 2009 at 4:11 AM
Updated September 8, 2014 at 11:31 AM
Resolved January 23, 2013 at 4:50 AM
Who's Looking?