You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a super class which is extended by sub class, the super class has a Discriminator Column and each sub class has its own Discriminator value, Lets say that Animal is the super class , Cat is the sub class
Note that, we dont have an attribute that maps to the discriminator column, but even if we could add it and then JinQ was able pick it up and use it instead of instance of, it will still be a work around and not a perfect solution
Jinq does not support translating instanceof at the moment. Since you have a workaround (making an attribute for the discriminator column), it might be a while before I have the time to look at it.
I think JPA doesn't support casting from one type to another, so even if I were to add support for TYPE to Jinq, it would only be useful for a very small number of queries.
Hey
I have a super class which is extended by sub class, the super class has a
Discriminator Column
and each sub class has its ownDiscriminator value
, Lets say that Animal is thesuper class
, Cat is thesub class
now if I try this
it throws an Exception
Note that, we dont have an attribute that maps to the discriminator column, but even if we could add it and then JinQ was able pick it up and use it instead of
instance of
, it will still be a work around and not a perfect solutionis there any possible way to detect inheritance ?
I think since JPA 2.0, there is a TYPE command, and I think also it can detect the discriminator column.
http://stackoverflow.com/questions/7807608/how-to-create-an-instance-of-like-query-in-jpa-2-0
The text was updated successfully, but these errors were encountered: