« Return to Thread: Using an existing database

Re: Using an existing database

by Andrew Patzer :: Rate this Message:

Reply to Author | View in Thread

If you are using Oracle, you may need to set your hibernate_sequence to a high enough value so that future insertions do not produce unique key constraint violations. For instance, if your highest key value in any of your tables is 182974, then the following statement would work for you -

SQL> alter sequence hibernate_sequence increment by 182975 minvalue 0;

Of course, if you're using MySQL, then you don't need to worry about any of this.

Andrew

On 5/31/07, Esbach, Brandon <Esbachb@...> wrote:

Hi All,

I'm fairly new to Grails/Hibernate - so hopefully this query isn't too noobish.
Currently I'm in the middle of designing a web client to access a database (previously accessed with a desktop client).  The only catch is, there is significant data already in place that is reliant on pre-existing tools - which means it's highly unlikely that I can restructure the database in the near future.

Outside of changing the *DataSource.groovy files to point to the relevant database (and provide user details), is there anything I would need to be wary of in terms of using the existing database? 

For example, is it likely to cause problems that some "standard" fields are not there (like id, version)?

Thanks!


 « Return to Thread: Using an existing database