Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用fuelphp的ORM,是否可以在模型中有一个字段parent_id和另一个字段parent_type,然后创建一个belongs_to关系,其中parent_id可能来自Model_A Model_B或Model_C,模型类型存储在parent_type中?
不是直接的,但是您可以使用三个关系定义来解决它,其中条件是过滤 parent_type 值。
请注意,当前条件仅适用于急切加载。
我在应用程序中使用 p:gmap 组件,但是当我尝试使用绑定属性来引用 bean 中的 GMap 时,它不起作用并且地图不显示。
JSF 代码:
<p:gmap binding="#{mapBean.map}" center=" -26.9995, -49.68