sequel - 在Sequel/Ruby中映射嵌套模型对象?

数据库中有一个'Orders'表,其中包含订单发货地址列,shipping_address_street或shipping_address_city ,我想将这些字段映射到包含地址的所有属性的嵌套Address对象。


Property order_number maps to column order_number


Property shipping_address contains an object of class `Address`


 Property shipping_address.street maps to column shipping_address_street


 Property shipping_address.city maps to column shipping_address_city



时间:

...