https://kotlinlang.org logo
h

hoang

07/14/2016, 11:00 AM
ah, perfect, thank you 🙂, the working code for this particular case is this
Copy code
@Entity
@Table(uniqueConstraints = arrayOf(
        UniqueConstraint(columnNames = arrayOf("productId", "serial"))
))
public class InventoryItem {
    val productId: Int = 0
    val serial: String = ""
}