spring + hibernate: have configurable pk generator?


we open + hibernate webapp.



this webapp deployed twin separate prolongation sites. twin prolongation sites webapp beget chairman information parallel.



what i need do, certain persons generated twin separate prolongation sites have graphic pks, combine chairman information twin sites during any time.



a offer imprisonment imposed me pks fit long, i can't uuids.



what i'm perplexing change tide hibernate mapping, method s_person generator:



<hibernate-mapping default-cascade="save-update" auto-import="false">
<class name="com.some.domain.person" abstract="true">
<id name="id">
<column name="person_id"/>
<generator class="sequence">
<param name="sequence">s_person</param>
</generator>
</id>
...
</hibernate-mapping>


into something configurable, person_id have the pks generated opposite sequences (maybe s_person_1 s_person_2) depending deployment site's open settlement files.



of course,



            <generator class="sequence">
<param name="sequence">${sequencename}</param>
</generator>


doesn't work, i have figure out something else... i speculation generator should indicate configurable bean spin points method another, nonetheless i can't figure that...



any ideas workaround?



thanks!



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?