Fix JPA annotations in test so that columns are correctly named. (#694)

This commit is contained in:
Rick Parker 2017-05-16 14:19:19 +01:00 committed by GitHub
parent 6c6ad2fcf6
commit 68f0e5d683

View File

@ -55,7 +55,7 @@ class HibernateObserverTests {
@Table(name = "Parents")
class Parent : PersistentState() {
@OneToMany(fetch = FetchType.LAZY)
@JoinColumns(JoinColumn(name = "transaction_id"), JoinColumn(name = "output_index"))
@JoinColumns(JoinColumn(name = "transaction_id", referencedColumnName = "transaction_id"), JoinColumn(name = "output_index", referencedColumnName = "output_index"))
@OrderColumn
@Cascade(CascadeType.PERSIST)
var children: MutableSet<Child> = mutableSetOf()
@ -71,7 +71,7 @@ class HibernateObserverTests {
var childId: Int? = null
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns(JoinColumn(name = "transaction_id"), JoinColumn(name = "output_index"))
@JoinColumns(JoinColumn(name = "transaction_id", referencedColumnName = "transaction_id"), JoinColumn(name = "output_index", referencedColumnName = "output_index"))
var parent: Parent? = null
}