test

Ruby code posted by test
created at 09 Oct 13:25, updated at 01 Feb 19:42

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@Entity
@NoArgsConstructor
@RequiredArgsConstructor
public class Application {

    @Id
    @GeneratedValue
    @Getter
    @Setter
    @Column(name = "application_id")
    private Long id;

    @NonNull
    @Getter
    @Setter
    @Column(name = "application_name", unique = true)
    private String name;

    @Getter
    @Setter
    @OrderColumn
    @ManyToMany(fetch = FetchType.EAGER)
    @JoinTable(name = "Application_Tools", joinColumns = @JoinColumn(name = "application_id"), inverseJoinColumns = @JoinColumn(name = "tool_id"), uniqueConstraints = @UniqueConstraint(columnNames = {
            "application_id", "tool_id" }))
    private List<Tool> tools = new ArrayList<Tool>();

}
717 Bytes in 2 ms with coderay