如何理解Doctrine2里面的mappedBy和inversedBy???/**@Entity*/classCustomer{//.../***@OneToOne(targetEntity="Cart",mappedBy="customer")*/private$cart;//...}/**@Entity*/classCart{//.../***@OneToOne(targetEntity="Customer",inversedBy="cart")*@JoinColumn(name="customer_id",referencedColumnName="id")*/private$customer;//...}
qq_笑_17
子衿沉夜
相关分类