Closed GoogleCodeExporter closed 9 years ago
Ok, my concept was wrong, two primary keys was used for a compound key
(searched at
the code by now)
The problem is that you are removing the primarykey property from the columns
when
it is a compound key, because you are adding it later, but in the way you also
remove the notnull and for every column!!!
I'm correcting + creating a patch including a test for this.
Original comment by gustavo.ringel@gmail.com
on 9 Jun 2008 at 12:58
The included patch has the following:
Test that SQLTransformationProvider GetColumns knows if the column is nullable.
Test that setting null properties for other columns when the table has a
compound
key doesn't set the other collumns to not null (what it was currently doing)
I suggest to apply it...
Currently is somewhat hard to test because of the absence of a GetColumn() in
the
_provider...i'm traversing the columns array in the tests for this...may be you
should consider to add this.
Additionaly i added the test about IsNullable to the
SQLTransformationProvider...it
should have been added to the base class, but first of all we should write for
every
provider the improved GetColumns...if it is right what i have started...i
didn't add
more properties until i know if you are ok with this.
Original comment by gustavo.ringel@gmail.com
on 9 Jun 2008 at 1:56
Sorry, here is the patch
Original comment by gustavo.ringel@gmail.com
on 9 Jun 2008 at 1:56
Attachments:
SVN 81
Thanks to Gustavo for finding this issue and starting the solution.
* Added a fix for not removing Null constraints from non-PK columns in a compound PK
scenario.
* Enhanced the GetColumns to also figure out the Nullability of columns on all the
providers except Oracle because I don't have access to it.
Original comment by geoffl...@gmail.com
on 10 Jun 2008 at 8:57
Original issue reported on code.google.com by
gustavo.ringel@gmail.com
on 9 Jun 2008 at 12:26