摘要:
#根据商品名称模糊查询商品的信息和所属分类名 #条件:产品名称 select p.*,pc.name as pname from product p left join product_category pc on p.category_id = pc.id where p.name like '% 阅读全文
摘要:
多对多通过注解查询数据 案例: 获取订单的详细信息 1.实体类: public class Category { private int id; private String name; List<Product> products; } public class Product { private 阅读全文
摘要:
一对多通过注解查询数据 案例: 获取分类信息和该分类下的所有产品 1.实体类: public class Product { private int id; private String name; private float price; } public class Category { pri 阅读全文