I need to use an id generation scheme that references an id generator table that lives in a different database than the persistent objects. I'd like to use a HiLo implementation, like MultipleHiLoPerTableGenerator.
Would it be as simple as calling the generate() method, while passing in the Session from the database with the id generation tables, and the object for which I'm generating the id? I'm worried that the impl expects the persistent object to have mapping definitions in the same Session as the id gen table (which it would not).
If this scheme would not work, can anyone suggest a different way of accomplishing this feat? Anyone know of a good 3rd-party HiLo implementation?
Thanks!
|