• DTD


    在写**.hbm.xml文件时,IDEA 给我报错

         

    <class name="Image" table="t_image" >
    <id name="imageId" column="imageId" type="java.lang.Long">
    <generator class="native"></generator>
    </id>

    <property name="imageName" column="imageName" type="java.lang.String" length="30"/>
    <property name="imageUploadDate" column="imageUploadDate" type="java.util.Date"/>
    <many-to-one name="user" column="userId" class="party.infoo.model.User"></many-to-one>

         <discriminator  column="imageType" type="java.lang.String"/>
    <subclass name="party.infoo.model.WorkImage"  discriminator-value="WorkImage"/>
    <subclass name="party.infoo.model.LifeImage" discriminator-value="LifeImage"/>
    </class>

    查看了一下DTD源文件,发现
    <discriminator  column="imageType" type="java.lang.String"/>   不是写在这里的     

    顺序应该放在 应该在前面

    <!ELEMENT class (
    meta*,
    subselect?,
    cache?,
    synchronize*,
    comment?,
    tuplizer*,
    (id|composite-id),
    discriminator?,
    natural-id?,
    (version|timestamp)?,
    (property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,
    ((join*,subclass*)|joined-subclass*|union-subclass*),
    loader?,sql-insert?,sql-update?,sql-delete?,
    filter*,
    resultset*,
    (query|sql-query)*
    )>

    必须按照 , 隔开的顺序来写呀
    By Ginfoo
  • 相关阅读:
    排球训练营
    TP5中手机端和PC端判断
    N550JV无法休眠,休眠自动重启的原因及解决方法
    HTML标签全称
    HTML思维导图
    HTML基础
    Web项目流程
    VsCode使用之HTML 中 CSS Class 智能提示
    MyEclipse崩溃 Java was started but returned exit code=-1073740791
    Python 类的特殊成员方法
  • 原文地址:https://www.cnblogs.com/infoo/p/6406901.html
Copyright © 2020-2023  润新知