gpt4 book ai didi

java - Hibernate 映射文件中的鉴别器值的含义是什么?

转载 作者:行者123 更新时间:2023-12-02 05:03:17 25 4
gpt4 key购买 nike

<class name="admin.model.OrganizationUnit" table="ORGANIZATION_UNIT" discriminator-value="admin.model.OrganizationUnit" dynamic-update="true">

<id name="ObjectId" type="string" column="object_id">
<generator class="assigned"/>
</id>
<discriminator column="discriminator"/>
<property name="ObjectType" type="string">
<column name="ObjectType" sql-type="varchar2(255)" not-null="true"/>
</property>

<subclass name="admin.model.DmSystem" discriminator-value="admin.model.DmSystem" dynamic-update="true">

<set name="ChildOrgs" lazy="true" table="ORGANIZATION_UNIT" where="ou_type_code='CWORG'">
<key column="system_org_id"/>
<one-to-many class="Dm.bizcomponent.admin.model.OrganizationUnit"/>
</set>

<set name="SystemAdminAccessGroup" lazy="true" inverse="true" table="CWGROUP" where="group_type_code='SYSTEM_ADMINACCESS'">
<key column="owner_id"/>
<one-to-many class="admin.model.Group"/>
</set>
</subclass>
</class>

Here is the mapping code In the above code there is one parent Class OrganizationUnit with two subclass

最佳答案

discriminator-value用于确定与基类数据库表中给定数据库行条目关联的实体子类类型的类类型。

关于java - Hibernate 映射文件中的鉴别器值的含义是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28043558/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com