kochcp wrote:
So, each mapping file should represent exactly a table in your database.
And they do (I'm using the table-per-subclass strategy). The problem is that only subclasses of PropertyValue have a "value" property. In the Java class, I have getValue and setValue methods marked as abstract. What I would need is the equivalent in the mapping files, a way to tell Hibernate "this property is abstract in the superclass (so I could query it), and you have to retrieve the value defined in the concrete class". I tried to make a dummy "value" property in PropertyValue, but didn't work.
kochcp wrote:
You'll need to work on your mapping files a little bit first before proceeding. Post a description of your DB (which classes should have collections of what, etc) and I might be able to help you out.
The mapping files are OK (this app has been working for months), and if I retrieve the full object (select p from PropertyValue p where p.id = ? and ...), there is no problem (the right concrete subclass is retrieved, including its "value" property).