java - Multiple database support using hibernate -


i working on application supports mssql , mysql , need make compatible oracle , postgresql too. have strong dependency on id generated records use same id generate logical identifiers records.therefore want each of tables have it's own sequence such each new record has new logical identifier in sequence n,n+1,n+2 , logical identifiers therefore xyn,xy(n+1),xy(n+2).

using generation strategy auto id worked both mssql , mysql doesn't work oracle or postgresql generation strategy auto maps sequence these databases. need maintain common code these databases , cannot afford make database changes. please suggest ways done.

if want portable across every rdbms, generationstrategy=table solution. check information in this article


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -