0
以下は私のハイバネートマッピングファイルです。私はtoStringとequalsメソッドを生成したいです。 hibernate tool ant taskを使用しています。ハイバネーションツールtoStringとメソッド生成
<class name="org.hibernate.db.Country" table="country" catalog="world">
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<id name="code" type="string">
<column name="Code" length="3" />
<generator class="assigned" />
</id>
</class>
しかし、私はtoStringまたはequalsメソッドを生成できません。このマッピングファイルに何か問題があります。
私はhibernate-mapping-3.0.dtdとhibernate-reverse-engineering-3.0.dtdファイルの両方が最新のものであることを確認しました。
よろしく、
のVivek S.シャー
うーん、1年前に誰かが同じ問題を抱えていた - 答えはなし:/ http://stackoverflow.com/questions/4945160/how-to-get-hibernate-tools-to-generate-pojos-with -tostring-equals-and-hashcode – Christian
このスレッドは役に立ちますか? http://stackoverflow.com/questions/2523826/hibernate-generate-pojos-with-equals – Christian