Hi all,
I am using Hibernate 2.1 the latest version, and my database is IBM AS/400.
I have a table called matter, which has a lot of columns, for cache reason, I only need some of its columns, and the primary keys are three fields, I am using composite-id, which works fine. But then, I want to add some columns for cache with different key (just one column this time) than before, and also want to keep the previous one. Anyone knows how to handle this kind of situation?
What I am thinking about it is, to create another new class and let it map to the same table, haven't tried this yet. (two classes map to one same table)
And also I don't know if I can use the previous class with two different keys? Seems not working. :(
Anyone has any ideas are so thankful!
|