Page 1 of 1

Oracle - data types

Posted: Tue 16 Feb 2010 16:02
by dilbert
I have just one question. Is there a way how to influence generated type of property?

I've been using dotConnect for Mysql where standard INT is mapped to Int32. Now I tried it with dotConnect for Oracle but all columns are always mapped to Decimal type.
I tried several options (e.g. NUMBER(10,0), NUMBER(11,0), NUMBER(1,0) or alias INTEGER ...).

I know it is possible to change it manually but it's quite a problem for 150 tables.

Thank you in advance.

Posted: Tue 16 Feb 2010 16:36
by AndreyR
We will investigate the situation. I will let you know about the results.

Similar problem

Posted: Tue 23 Mar 2010 17:45
by asaake
Hi,

we have a similar problem. We get some generated properties as decimal, some as double. We wish to have them all as decimal.

In the moment, after code generation, we find & replace all doubles.

So a kind of mapping rule would be great !

Thanks,

Andreas

Posted: Wed 14 Apr 2010 14:08
by PatrikAhlquist
Same here.

NUMBER(*,0) becomes decimal.

/Patrik

Posted: Thu 15 Apr 2010 14:39
by AndreyR
NUMBER(4,0) comes to Int32 for me in the latest 5.60.120 build, for example.
PatrikAhlquist, could you please describe the situation in which you obtain decimal type?

Posted: Mon 19 Apr 2010 12:01
by PatrikAhlquist
In the example below, "HANDELSETYP" is a whole number but becomes a decimal type.
Note the "*", maybe that's the problem?

Code: Select all

CREATE
 TABLE "PL"."MARKNADS_KO"
 (
  "RULL_ID"     CHAR(12 BYTE) DEFAULT NULL NOT NULL ENABLE,
  "HANDELSETYP" NUMBER(*,0) DEFAULT 0 NOT NULL ENABLE,
  "KOMMENTAR"   CHAR(200 BYTE) DEFAULT ' ',
  "SKP_DATUM" DATE DEFAULT CURRENT_DATE NOT NULL ENABLE,
  "SKP_TID" CHAR(8 BYTE) DEFAULT TO_CHAR(sysdate,'HH24:MI:SS') NOT NULL ENABLE,
  "UPD_DATUM" DATE DEFAULT CURRENT_DATE NOT NULL ENABLE,
  "UPD_TID"             CHAR(8 BYTE) DEFAULT TO_CHAR(sysdate,'HH24:MI:SS') NOT NULL ENABLE,
  "ANTAL_UPPDATERINGAR" NUMBER(*,0) DEFAULT 0 NOT NULL ENABLE,
  CONSTRAINT "MARKNADS_KO_PRIM_KEY" PRIMARY KEY ("RULL_ID", "HANDELSETYP", "SKP_DATUM", "SKP_TID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "PLTSIDX" ENABLE,
  CHECK ( handelsetyp BETWEEN 0 AND 999 ) ENABLE,
  CHECK ( antal_uppdateringar >= 0 ) ENABLE,
  CHECK ( SUBSTR(rull_id,7,6) >= 0 ) ENABLE,
  CHECK ( SUBSTR(rull_id,1,6) >= 0 ) ENABLE
 )

Code: Select all


  
	
	
	
	
  
  
  
  
  
  
  
  
  


Posted: Tue 20 Apr 2010 11:27
by AndreyR
Thank you for your assistance.
I will let you know about the decision on changing this behaviour.

Posted: Tue 27 Apr 2010 14:04
by AndreyR
This behaviour is designed and will not be changed.
The reason is the fact that decimal capacity is wider than the integer one, and we are unable to determine the maximal capacity for the NUMBER(*, 0) data type.