J
Jacqui
Hi,
I have a model for a webapp which is set up as follows:-
JobService - base class
AirportPickupService - extends JobService
LeaseNegotiationService - extends JobService
..... and so on for 28 services.
These are currently modelled in Hibernate as joined subclasses.
I also have a class 'Job' which has a collection of job services. This
has a method getJobServices().
When I call getJobServices() I are get a MySQL too many tables
exception. I believe this is because Hibernate tries to put all 28
services into a single SQL query. Is there any way of telling
Hibernate to use separate queries for each of the subclasses?
Would changing the system to table-per-concrete-class work? This is a
really ugly way of doing it in our system, as there are many columns in
the JobService class.
I look forward to hearing your reply on this matter. Thanks in
advance.
Regards,
Jacqui
I have a model for a webapp which is set up as follows:-
JobService - base class
AirportPickupService - extends JobService
LeaseNegotiationService - extends JobService
..... and so on for 28 services.
These are currently modelled in Hibernate as joined subclasses.
I also have a class 'Job' which has a collection of job services. This
has a method getJobServices().
When I call getJobServices() I are get a MySQL too many tables
exception. I believe this is because Hibernate tries to put all 28
services into a single SQL query. Is there any way of telling
Hibernate to use separate queries for each of the subclasses?
Would changing the system to table-per-concrete-class work? This is a
really ugly way of doing it in our system, as there are many columns in
the JobService class.
I look forward to hearing your reply on this matter. Thanks in
advance.
Regards,
Jacqui