Setting entity types

Report a typo

Which method will cascade in the code below?

Java
@Entity
@Table(name = "hardware")
public class Hardware {
    @Id
    @Column(name = "hardware_id")
    private long hardwareId;

    @Column(name = "hardware_type")
    private String hardwareType;

    @OneToMany(cascade = CascadeType.REMOVE)
    private List<ComputerBuild> builds = new ArrayList<>();

}
Kotlin
@Entity
@Table(name = "hardware")
data class Hardware (
    @Id
    @Column(name = "hardware_id")
    var hardwareId: Long = 0L,

    @Column(name = "hardware_type")
    var hardwareType: String = "",

    @OneToMany(cascade = [CascadeType.REMOVE])
    var builds: List<ComputerBuild> = ArrayList()
)
Select one option from the list
___

Create a free account to access the full topic