Thank you! Your feedback has been delivered
Thank you! Your feedback has been sent

New column created by Hibernate

Previously 3 columns created: id, previewLinkValue, languageKey After doing it by spring, now also previewLinkKeyParameters_KEY started to be created, which is causing errors.

How to get rid of new column creation by Hibernate annotation?

The code:

@ElementCollection(fetch = FetchType.EAGER) 
@CollectionTable(name = "casetextsets_previewlinks", joinColumns = @JoinColumn(name = "id"))
@MapKeyJoinColumn(name = "languageKey")
@Column(name = "previewLinkValue")
public Map<String, Long> getPreviewLinkKeyParameters() {
    return previewLinkKeyParameters;
}
User Gravatar

alexeuka

Posted Jan 13 2014 1:43 UTC

$50


  • Assigned To alexeuka
  • Solved
  • java
    hibernate
    problem
  • 590 Views

1 Replies


Solved by:

@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "casetextsets_previewlinks", joinColumns = @JoinColumn(name = "id"))
@MapKeyColumn(name = "languageKey")
@Column(name = "previewLinkValue")
public Map<String, Long> getPreviewLinkKeyParameters() {
    return previewLinkKeyParameters;
}
User Gravatar

alexeuka

Posted Jan 13 2014 3:50 UTC

Solution

This didn't solve your task? Get your own custom solution.

Add a reply

By posting a reply on CodersClan you agree to our Terms & Conditions