문제

우리는 최대 절전 모드를 사용하여 새 프로젝트에서는 우리가 사용하는 hibernate.reveng.xml 을 만들의 *.hbm.xml 파일 및 Pojo 습니다.우리는 같 방법을 각각의에서 우리의 Pojo.내가 찾는 데 사용할 수 있는 <meta attribute="use-in-equals">true</meta> 에서 당신의 hbm 파일을 표시하는 속성을 사용하는에서 같습니다.그러나 뜻이 편집 많은 파일을 다시 파일을 편집을 나중에 다시면 우리는 테이블을 수정하여 또는 열에서 우리의 DB.

그래서 제가 궁금했던 방법이 있는 장소는 속성을 사용하는에서 같 방법에 대한 각 pojo(테이블)에 hibernate.reveng.xml 요?

도움이 되었습니까?

해결책

This is an undocumented feature (and the online DTD is out of date) but you can add <meta> in the <table> and <colum> elements. In other words, you should be able to do this:

<table name="PROPERTY" catalog="DATA" schema="PUBLIC">
  <meta attribute="extends">BasicDataObject</meta>
  <meta attribute="scope-class">public abstract</meta>
  <column name="ID">
    <meta attribute="use-in-equals">true</meta>
    <meta attribute="use-in-tostring">true</meta>
  </column>
</table>

The DTD in hibernate-tools.jar should be up-to-date (and looks like this one) and declare:

<!ELEMENT column (meta*) >

There is a discussion about this in the Seam in Action forums.

다른 팁

이클립스가 동일하고 해시 코드의 생성기입니다.이용목적이 달성되면 지체 없이 파기 위해 세대의 사람의 방법이 있습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top