|
From: <tri...@tr...> - 2003-10-20 13:48:38
|
Juergen, > Generally, everything works nicely so far on both implementations. There's > one issue though: HsqlJdbcClinic uses HsqlMaxValueIncrementer for id > generation, with one sequence table per domain table. Hibernate doesn't have > a similar id generation strategy, so I'm wondering what to do to make both > impls work on the same database. The Hibernate docs say that HSQL supports > "identity" for id columns; why are we not using this for HsqlJdbcClinic too? > I.e. making the id columns identity columns and getting rid of all the > sequence tables. I guess there's a drawback with this; can anyone shed some > light on the issue? > Does Hibernate use a different ID strategy for different databases? I think what is implemented in the Petclinic is a strategy that would work the same across different databses as long as there is a MaxValueIncrementer implementation. If we change the Petclinic JDBC implementation to use identity columns, then we need to figure out how to run the insert and subsequent query to retrieve the id using the same connection whether we are in a transaction or not. Thomas |