-->
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: Sollutions to some oracle rev-eng problems and a question
PostPosted: Fri Aug 19, 2005 3:58 pm 
Beginner
Beginner

Joined: Mon May 02, 2005 6:17 pm
Posts: 41
I ran into some problems with oracle and i after a painfull day i found a way to deal with them. So here they are.
In (generated by enterprise architect) oracle sql script we had types like smallint bigint and integer which were all entered in db as decimal without a warning!. Normally reveng.xml was useless because those were never found by tools so the sollution was to use decimal.
Similar problem occurs when a type appears in the script which oracle doesn't recognize. It just sets it as other which is mapped to java.lang.Object by tools.
As far as case insensitivity is concerned it can be taken care of by putting table and column names in double quotes. But this comes with a price. Hibernate is unable to properly map tables if they were named like i mentioned above. It reports that the table or view cannot be found.
Does anybody have an idea how it can be resolved?

_________________
www.globalresearch.ca


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 19, 2005 5:38 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i never seen oracle behave like this - it normally is pretty strict on what types you give it...guess it wasnt in your case (glad to hear it wasnt the tools that were the problem ;)

I dont have issues with oracle case sensitivity (except when reverse engineering) - your issus about case sounds like its happening at runtime with hibernate ? Oracle is normally ok with "select blah" instead of "select BLAH" AFAIK

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 19, 2005 8:50 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Quote:
ran into some problems with oracle and i after a painfull day i found a way to deal with them. So here they are.
In (generated by enterprise architect) oracle sql script we had types like smallint bigint and integer which were all entered in db as decimal without a warning!. Normally reveng.xml was useless because those were never found by tools so the sollution was to use decimal.


Oracle haven't types : smallint,bigint and integer.There is type NUMBER for all numeric types and in last version (10g rel 2) binary_float and binary_double

for max : 'select blah' and 'select BLAH' is same, but you can have query 'select "bLaH" ' and it search for identifier 'bLaH' in database - you can create table with :

create table "AbC" ....

and query

select * from abc
or
select * from AbC

doesn't work, but

select * from "AbC"

work


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 20, 2005 7:56 am 
Beginner
Beginner

Joined: Mon May 02, 2005 6:17 pm
Posts: 41
@max
The error happens when hibernate is started and begins to validate hbm.xml's. For example it looks for AgentDeployedInAction but in the db it's AGENTDEPLOYEDINACTION. Why then does JDBC driver report "table or view does not exist" if oracle is CI?
@snpesnpe
As for the types i know there are no smallint bigint. But it could have at least fired off a warning. At lest that's what I expect from a DBMS that's expensive as a good kidney :)

@max when do you expect hib tools will be able to map to primitive types?

_________________
www.globalresearch.ca


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 20, 2005 11:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it already can - you just need to tell it in reveng.xml

_________________
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.  [ 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.