Oracle - data types

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
dilbert
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Oracle - data types

Post by dilbert » Tue 16 Feb 2010 16:02

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.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 16 Feb 2010 16:36

We will investigate the situation. I will let you know about the results.

asaake
Posts: 17
Joined: Tue 25 Mar 2008 16:51

Similar problem

Post by asaake » Tue 23 Mar 2010 17:45

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

PatrikAhlquist
Posts: 21
Joined: Thu 11 Feb 2010 08:40

Post by PatrikAhlquist » Wed 14 Apr 2010 14:08

Same here.

NUMBER(*,0) becomes decimal.

/Patrik

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 15 Apr 2010 14:39

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?

PatrikAhlquist
Posts: 21
Joined: Thu 11 Feb 2010 08:40

Post by PatrikAhlquist » Mon 19 Apr 2010 12:01

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


  
	
	
	
	
  
  
  
  
  
  
  
  
  


AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 20 Apr 2010 11:27

Thank you for your assistance.
I will let you know about the decision on changing this behaviour.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 27 Apr 2010 14:04

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.

Post Reply