|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Using an existing databaseHi All, I'm fairly new to Grails/Hibernate - so hopefully this query isn't too noobish.
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! |
|
|
Re: Using an existing databaseCouple of things:
* make sure you comment this line: String dbCreate = "update" // one of 'create', 'create-drop','update' You dont want grails altering your schema :) * Instead of groovy domain objects, create java domain objects with JPA annotations. Refer http://grails.codehaus.org/Hibernate+Integration
|
|
|
Re: Using an existing databaseIf 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:
|
| Free embeddable forum powered by Nabble | Forum Help |