• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it possible to use Multiple hibernate configuration for same database schema?

 
harini badri
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are trying to support different version of software for same database schema.The database here is upgraded, but still want the lower versions to work with it. Is it possible to do so with hibernate?

I have a column called "Class' which is a discriminator column for the table.

In version 1 of the software we had subclass A and B.
In version 2 we are introducing another subclass C.

Now how to make both the version 1 work with version 2?

In version 1, I get net.sf.hibernate.WrongClassException when the table has a value C in the column "Class".

Without any code change in version 1 is it possible to design hibernate in such way that it can work for upgraded database schema.

Thanks.



 
harini badri
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Got this resolved by setting force=true for discriminator column.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic