当我创建如下的双向1:n关系时,生成器不会在表上使用任何FOREIGN KEY(...)约束条件。
entity customer = schema.addEntity("Customer");
customer.addIdProperty();
customer.addStringProperty("name").notNull();
Entity order = schema.addEntity("Order");
order.setTableName("ORDERS"); // "ORDER" is a reserved keyword
order.addIdProperty();
Property orderDate = order.addDateProperty("date").getProperty();
Property customerId = order.addLongProperty("customerId").notNull().getProperty();
order.addToOne(customer, customerId);
customer.addToMany(order, customerId);
这正常吗?它是否应该在表中生成FOREIGN KEY(...)约束,还是仅通过代码在运行时强制执行?