Skip to content

Commit

Permalink
kludge to handle Hibernate’s hbm incorrect generation of composite pr…
Browse files Browse the repository at this point in the history
…imary keys in certain conditions

Bug and work-around provided by @vsalaman - aka The Expert
  • Loading branch information
ar committed Dec 24, 2018
1 parent db8ef91 commit 466d074
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
</meta>
<composite-id unsaved-value="any">
<key-many-to-one name="journal" class="org.jpos.gl.Journal"
foreign-key="FKAccountLockJournal"/>
foreign-key="FKAccountLockJournal" column="journal"/>
<key-many-to-one name="account" class="org.jpos.gl.Account"
foreign-key="FKAccountLockAccount" />
foreign-key="FKAccountLockAccount" column="account" />
</composite-id>
</class>
</hibernate-mapping>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
<class name="org.jpos.gl.BalanceCache" table="balance_cache">
<composite-id>
<key-many-to-one name="journal" class="org.jpos.gl.Journal"
foreign-key="FKBalanceCacheJournal"/>
foreign-key="FKBalanceCacheJournal" column="journal" />
<key-many-to-one name="account" class="org.jpos.gl.Account"
foreign-key="FKBalanceCacheAccount" />
foreign-key="FKBalanceCacheAccount" column="account" />
<key-property name="layers" type="string" length="32" />
</composite-id>
<property name="ref" type="long" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
<key-property name="date" type="timestamp" />
<key-property name="layers" type="string" length="32" />
<key-many-to-one name="journal" class="org.jpos.gl.Journal"
foreign-key="FKCheckpointJournal"/>
foreign-key="FKCheckpointJournal" column="journal" />
<key-many-to-one name="account" class="org.jpos.gl.Account"
foreign-key="FKCheckpointAccount "/>
foreign-key="FKCheckpointAccount" column="account" />
</composite-id>
<property name="balance" type="big_decimal">
<column name="balance" sql-type="numeric(14,2)" not-null="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</meta>
<composite-id>
<key-property name="id" type="short" />
<key-many-to-one name="journal" class="org.jpos.gl.Journal" />
<key-many-to-one name="journal" class="org.jpos.gl.Journal" column="journal" />
</composite-id>
<property name="name" type="string" length="80" />
</class>
Expand Down

0 comments on commit 466d074

Please # to comment.