foreignColumns with multiple columns validation error #526

Closed
soaringhill opened this Issue Nov 14, 2015 · 5 comments

Comments

Projects
None yet
4 participants
@soaringhill

When I try and use foreignColumns with multiple comma separated keys I get the following error.
'There should be the same number of columns and foreignColumns in property customFields'

I've spent hours trying to get this to work and then found this in the source which may be related.

Could be related to this statement in MapperBuilderAssistant.buildResultMapping

List<ResultMapping> composites = parseCompositeColumnName(column);
if (composites.size() > 0) {
  column = null;
}
@emacarron

This comment has been minimized.

Show comment
Hide comment
@emacarron

emacarron Dec 23, 2015

Member

I cannot find that text! Can you post the stacktrace?

Member

emacarron commented Dec 23, 2015

I cannot find that text! Can you post the stacktrace?

@soaringhill

This comment has been minimized.

Show comment
Hide comment
@soaringhill

soaringhill Dec 23, 2015

I don't have the stackctrace. The exception is thrown in ResultMapping.validate below. The bug is probably caused when the variable column is set to null in MapperBuildAssistant shown above.

Thanks

private void validate() {
...
    if (numColums != numForeignColumns) {
      throw new IllegalStateException("There should be the same number of columns and foreignColumns in property " + resultMapping.property);
    }
  }
}

I don't have the stackctrace. The exception is thrown in ResultMapping.validate below. The bug is probably caused when the variable column is set to null in MapperBuildAssistant shown above.

Thanks

private void validate() {
...
    if (numColums != numForeignColumns) {
      throw new IllegalStateException("There should be the same number of columns and foreignColumns in property " + resultMapping.property);
    }
  }
}
@harawata

This comment has been minimized.

Show comment
Hide comment
@harawata

harawata May 9, 2016

Member

Hi @soaringhill ,

Could you provide a test case or an example project to reproduce the issue?
It might be easier to copy and modify the existing test case using single foreignColumn.

Thank you!

Member

harawata commented May 9, 2016

Hi @soaringhill ,

Could you provide a test case or an example project to reproduce the issue?
It might be easier to copy and modify the existing test case using single foreignColumn.

Thank you!

@kazuki43zoo

This comment has been minimized.

Show comment
Hide comment
@kazuki43zoo

kazuki43zoo Nov 23, 2016

Member

Hi @soaringhill , Could you provide a repro project ?

Member

kazuki43zoo commented Nov 23, 2016

Hi @soaringhill , Could you provide a repro project ?

@harawata

This comment has been minimized.

Show comment
Hide comment
@harawata

harawata Feb 3, 2017

Member

No reply.

Member

harawata commented Feb 3, 2017

No reply.

@harawata harawata closed this Feb 3, 2017

@harawata harawata reopened this Feb 3, 2017

@harawata harawata closed this in 9d29135 Feb 4, 2017

@harawata harawata self-assigned this Feb 4, 2017

@harawata harawata added bug and removed waiting for feedback labels Feb 4, 2017

@harawata harawata added this to the 3.4.3 milestone Feb 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment