如何在Oracle SQL中将数据插入REF链接表中

时间:2018-08-17 01:56:01

标签: sql oracle

这是我的类型和表格,

@Entity
@Table(name = "DOCUMENT")
public class Document implements Serializable {

private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "FILEID")
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long idFile;

    @Lob
    @Column(name = "CONTENT")
    private byte[] content;

    @Column(name = "NAME")
    private String name;

    @Column(name = "ID_MAIL_USER")
    private String idMailUser;

    @Column(name = "NUM_PAGES")
    private int numPages;

    @Column(name = "TO_ANALIZE")
    private boolean toAnalize;

    @Column(name = "HASH")
    private String hash;

    @Column(name = "EXTENSION")
    private String extension;

    @Column(name = "SIZE")
    private double size;

    @Column(name = "LINK_TO_DRIVE_FILE")
    private String linkToDriveFile;

    @Column(name="PATH")
    private String path;

    @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
    @Column(name = "PAGES")
    private List<Page> pages = new ArrayList<>();

   // Setter Getters
}

如何将数据插入“策略”表?

0 个答案:

没有答案