-->
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: hbm2java: <meta attribute="extends"> broken?
PostPosted: Thu Feb 26, 2004 6:28 pm 
Expert
Expert

Joined: Thu Jan 08, 2004 6:17 pm
Posts: 278
The 20040224 CVS extensions source contains the following in JavaTool.java:

Code:
      public String getExtends(ClassMapping cmap) {
         String extendz = null;
         if(cmap.getSuperClass()!=null) {
            extendz = cmap.getSuperClass();
         } else if (cmap.isInterface() && cmap.getMeta("extends")!=null) {
            extendz = cmap.getMetaAsString("extends");
         }
            
         return extendz;
      
      }


Note the "if (cmap.isInterface()..." -- I claim that this is a bug. Why should the "extends" clause only apply if the current class being generated is only an interface? In other words, why should <meta attribute="interface"> have anything to do with <meta attribute="extends">?

I am patching my local hbm2java to NOT do this, but the patch is simply to comment out "cmap.isInterface() &&" in the if statement, so I won't bother to submit it :-) Is this a bug? If so I'll JIRA it.

Cheers!
Rob


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 01, 2004 11:23 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Yes post it to JIRA please.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 01, 2004 1:21 pm 
Expert
Expert

Joined: Thu Jan 08, 2004 6:17 pm
Posts: 278
Done:

http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-770

Cheers!
Rob


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.