Is there any way to map one object to two different tables? I have an object that has a boolean flag which basically indicates which database table the data came from. I have two standard SQL queries that generate the same information, but from separate tables (one contains verified data, one contains as yet un-verified data).
I could refactor the DB schema and put the flag in the database table, but that causes other complications. The other option is to create two separate classes with the same functionality (and implementing the same interface/extending the same superclass), but I would currently like to avoid that.
I am using version 2.1.2 with SQL Server. I assume that I will have to do one of the two choices above to use hibernate, but would be impressed if there were some way to configure Hibernate to accomodate my current set up.
_________________ Thanks,
CJ
|