Hi,
I'm trying to query for a table where I only want superclass data without any subclass info. I have classes currently setup as
Class A { int x }
Class B extends A { int y }
With tables that look like
A id=1, x=1 id=2, x=5
B id=1, y=2
I'd like a query of table A to return ONLY id=1,x=1 and id=2,x=5, re: the superclass (A) data, without any subclass (B) data. I can't seem to find a way to run the query where table B is ignored without getting unknown column "y" errors. The main reasons not to include any subclass data is because 1- I only need the superclass data and 2- the app needs to be scalable.. B is just an example extension of A, but other subclasses (that I don't know about) will also be extending it.
I've searched the forums and found this problem show up several times, without any satisfactory result. Adding polymorphism=explicit to my mapping file has no effect.
TIA for any help.
|