max,
this is a really old message, and many forum and jira questions seem to indicate this can't be done.
did you have something in mind when you said "make your usertype polymorphic"?
I would like to model an inheritance tree of "states" as a <component>. So the following types would be polymorphically mappable:
interface State { void doSomething(Domain obj); }
interface Open extends State {}
interface Closed extends State {}
class Created implements Open { void doSomething(Domain obj) {...} }
class OnHold implements Open { void doSomething(Domain obj) {...} }
...
class Completed implements Closed { void doSomething(Domain obj) {...} }
class Cancelled implements Closed { void doSomething(Domain obj) {...} }
...
I want polymorphic queries to work, so that I can select all tasks in the open state: "select task from Task task, Open state where task.state=state"
Thanks
max wrote:
<property> is for values
<any> is for entities
two different things.
if you want a "polymorphic" property, why don't you just make your usertype polymorphic ?