Yes, I'll confess up front that I'm a new user, but I have been trying to do my part reading up. I apologize in advance for my ignorance.
I tried to access the XDoclet tutorial at
http://www.meagle.com:8080/hibernate.jsp but it wasn't found. There may be a better way of going about this, and any advice would be appreciated.
I have a class that has several fields that can are variable upon instantiation, and then remain fixed thereafter. The same class also has a small number of fields that continue to change after instantiation.
e.g. (only an example - not the real application)
Class: Customer
Name: fixed
Address: fixed
Telephone: fixed
Balance: fluctuating
I want to record the state of the class through time, but I don't want to continually persist fields like Name Address and Telephone. I only need to record them once. Balance, on the other hand needs to be continually tracked.
Is there a way to split the persistence into two different tables (i.e. a fixed table and a dynamic table)?
I have pre-existing POJOs and am trying to generate the XML using XDoclet for Hibernate. Looking at example 9.5.1 from Hibernate in action:
Code:
/**
* @hibernate.class
* table = "USERS"
*/
Is it only possible to map to one table? If yes, would the best solution be to extract the changing data to a new class, or is there a better one? If no, I must be missing the section on how to define different types of saves.
Thank you and again, my apologies for what is most likely basic material.