Hi there,

I have two classes that have a unidirectional one to one relationship. So for example:

Code:
class Car{
   Engine engine
}

class Engine{ }
I have a requirement such that any time this object graph changes, I want to increment the version of the Car class, and then insert the new version of the Engine class (and maintain previous versions too).

So for example, when I create a new Car/Engine, I insert the Car class then insert the Engine class. Anytime I make an update, I update the Car class and INSERT the new version of the Engine class.

Before I resort to something crazy, like overriding save() and using GSQL, is there some way either in the GORM Mapping DSL or in Hibernate that I can make this happen?

Thanks in advance for this HUGE help.

Regards,
Matt