Hello folks,
In fact, you should not define an extra class attribute for the discriminator
column. Probably this is the cause of your error.
So, your class might look like this:
@Entity @Table(name=products)
| @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
|
I had to hack to Hibernate core to make this work. I changed the line that
throws the exception to just issue a warning and I can now read rows
successfully. The proper class is returned based on the discriminator column
value as expected.
This must be a bug as I definitely do no have
did u managed to work it out?
im getting the same error ,,, :(
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4134276#4134276
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4134276
Felix,
So how is the EJB subsystem going to know which class to return if I don't use
a discriminator column?
I tried removing the discriminator as you suggested, knowing it would not work,
and as I thought it did not work. I get the error below with no discriminator
column in any of the
You do not need to define the discriminator column at all. It doesn't even have
to have a getter/setter.
Regards
Felix
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4119255#4119255
Reply to the post :
Can anyone confirm they have seen this work? I just followed examples but
cannot get it to work.
If you have it working please specify which versions of JBoss and Hibernate
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4118439#4118439
Reply to the post :
Title was chopped:
ended with:
w/SINGLE_TABLE inheritance
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4118123#4118123
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4118123
___