-->
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.  [ 5 posts ] 
Author Message
 Post subject: Error compiling hbm2java classes
PostPosted: Tue Apr 20, 2004 12:46 pm 
Newbie

Joined: Wed Apr 14, 2004 4:01 pm
Posts: 2
I am getting the following error when I try to compile the java classes created by hbm2java. It seems it did not implement onSave(). Is this something we have to implement or should it have done it?

[javac] C:\java\Middlegen-Hibernate-r4\build\gen-src\com\ticket\dataobject\Ticket.java:11: com.ticket.dataobject.Ticket sh
ould be declared abstract; it does not define onSave(net.sf.hibernate.Session) in com.ticket.dataobject.Ticket
[javac] public class Ticket implements net.sf.hibernate.Lifecycle,Serializable {
[javac] ^
[javac] 1 error

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 8:04 pm 
Senior
Senior

Joined: Fri Nov 21, 2003 5:55 am
Posts: 155
you can uncheck the radion button in middlegen or delete implements ...LifeCycle into your POJO's.
Or if you need this implement, add the method onLoad, OnUpdtae, Ondelete.... to them.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 8:24 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Assuming that you using the latest version of hbm2java, Create a JIRA job so that hbm2java will be enhanced to generate the extra method(s).
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 20, 2004 3:27 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
eh - if you have listed an interface in the implements line then you would need to make the class abstract and extend the class your self or use the "class-code" meta tag for inserting extra code.

hbm2java have no idea on what the body of your onSave() method should contain, right ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 21, 2004 7:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Yes your right - was not thinking.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.