为简单起见,我有一个客户 1 -- * 订单
Create table customers (
customer_id int,
offset_id int,
name text,
CONSTRAINT pk_customer_id PRIMARY KEY ( customer_id, offset_id ))
Create table orders (
id int,
offset_id int,
name text,
customer_id int,
CONSTRAINT pk_order_id PRIMARY KEY ( id, offset_id ),
CONSTRAINT fk_orders_customerid FOREIGN KEY (customer_id, offset_id ) REFERENCES customer (customer_id, offset_id)
有没有办法将订单拉入客户模型?