-->
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: Middlegen maps Oracle RAW Type to byte []. Cannot gen POJO.
PostPosted: Fri Feb 06, 2004 9:33 am 
Newbie

Joined: Fri Jan 30, 2004 5:10 pm
Posts: 7
Location: S
Hello.

I'm currently using Oracle 8.1.7.4, hibernate 2.1 and middlegen 2.0

One of my tables has a RAW colum, that middlegen maps to a byte [] attribute (So far, it even seems right).

Although, the middlegen hibernate plugin (hbm2java, as net.sf.hibernate.tool.hbm2java.Hbm2JavaTask) generates an exception when generating the pojos objects from the hbm.xml model.

I edited the hbm model my self, and changed the byte [] to java.lang.String type, which works just fine for query (SELECT);

Is is a middlegen issue rather than a hibernate question?

Is there a better way to do this specific Oracle RAW type mapping?

Regards,

Flavio Matiello


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 06, 2004 10:22 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Middlegen does its best to select to appropriate mapping for you when you the user has not given a selection (eg, first time you run it). Then its up to the user so you can change the mapping using the GUI to what ever is appropriate. In some cases, there is a preference for a type mapping to be applied in general so you can then create your own JavaTypeMapper and plug it into the Middlegen Hibernate plugin so that it will map the type (first time) to your prefered type. See the Middlegen page on this wiki for more information.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 07, 2004 6:06 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you say hbm2java generate an exception ?

why is that ? ;)

And what is it ?

/max

_________________
Max
Don't forget to rate


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.