-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Hibernate Tool - generated class is not abstract
PostPosted: Wed Aug 27, 2008 8:43 am 
Newbie

Joined: Wed Aug 27, 2008 8:33 am
Posts: 3
Location: Gdańsk [Poland]
Hibernate version: v3.2.6.ga


Hi, why the generated class is not abstract as pointed in hbm file? Is this a bug?


Code:
<class abstract="true" name="MultimediaContent">
  <id name="id" type="long">
   <meta attribute="scope-set">protected</meta>
   <generator class="seqhilo">
    <param name="sequence">multimedia_content_seq</param>
    <param name="max_lo">100</param>
   </generator>
  </id>
  <discriminator column="MEDIA_TYPE" force="false" insert="true"
   length="1" not-null="true"/>
  <many-to-one class="MultimediaContainer" name="container" not-null="false"/>
  <property generated="never" lazy="false" name="filename" type="string"/>
  <property generated="never" lazy="false" name="size" type="long"/>
</class>
<subclass discriminator-value="I" extends="MultimediaContent"
  name="ImageContent" select-before-update="false"/>
<subclass discriminator-value="A" extends="MultimediaContent"
  name="AudioContent" select-before-update="false"/>
<subclass discriminator-value="V" extends="MultimediaContent"
  name="VideoContent" select-before-update="false"/>


Last edited by aleksjej on Sat Aug 30, 2008 7:44 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 29, 2008 6:35 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
possibly, put it in jira.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 30, 2008 7:43 am 
Newbie

Joined: Wed Aug 27, 2008 8:33 am
Posts: 3
Location: Gdańsk [Poland]
Problem solved. When we want to use polymorphism we need to use union-subclass not subclass which does not support this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.