Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.persistence.*;
- import java.util.Set;
- @Entity
- @Table(name="product")
- public class Product {
- @Id
- private Long prod_id;
- private String title;
- @ManyToOne
- @JoinColumn(name="category")
- private Category category;
- @OneToMany(mappedBy = "product")
- private Set<Custom_fields> custom_fields;
- @ManyToOne
- @JoinColumn(name="manufacturer")
- private Manufacturer manufacturer;
- @OneToMany(mappedBy = "product")
- private Set<Product_image> img;
- private Double sale;
- private Double price;
- private Long quantity;
- private java.sql.Timestamp date_added;
- private String description;
- import javax.persistence.*;
- @Entity
- @Table(name="product_image")
- public class Product_image {
- @Id
- private Long img_id;
- private String path;
- private String alt;
- private String title;
- @ManyToOne
- @JoinColumn(name = "product_id")
- private Product product;
Add Comment
Please, Sign In to add comment