Problem with Decimal type with Firebird
 
CapableObjects Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Problem with Decimal type with Firebird Expand / Collapse
Author
Message
Posted 2009-06-02 17:08:54
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Today @ 13:43:19
Posts: 56, Visits: 272
Hi,

I have an attribute declared as a Decimal type. When I try the GenerateDB, I get an error.

Here's an example of the DDL that ECO is generating:
CREATE TABLE BillingItem (ECO_ID VARCHAR(32) NOT NULL, ECO_TYPE SMALLINT NOT NULL, "LINE_ITEM_NO" INTEGER DEFAULT 0, "TOTAL_AMOUNT_DUE" , CONSTRAINT IX_PK_BillingItem PRIMARY KEY (ECO_ID))

As you can see "TOTAL_AMOUNT_DUE" has a data type of , but it's supposed to be a Decimal data type.


Best Regards,
Daniel Rail

Senior Software Developer
Accra Solutions Inc.(www.accra.ca)
Accra Med Software Inc. (www.filopto.com)
Blog (railoffice.dyndns.org)
Post #3521
Posted 2009-06-03 00:20:20
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: 2010-07-21 00:21:24
Posts: 1 228, Visits: 1 373
What build are you using? I just tried on my machine and the default column type for a System.Decimal attribute is "DECIMAL(18,2)".

I just posted a new ECO 5 build on the website, please see if it solves the problem.


/Jonas Hogstrom [CapableObjects]
Post #3524
Posted 2009-06-03 15:58:18
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Today @ 13:43:19
Posts: 56, Visits: 272
The problem was that the table was reverse engineered and instead of using for the PersistenceMapper property, it was using GenericAttributeMapper. The same thing happened for the database fields that where defined as a Date type(Time and Timestamp fields were fine).

Best Regards,
Daniel Rail

Senior Software Developer
Accra Solutions Inc.(www.accra.ca)
Accra Med Software Inc. (www.filopto.com)
Blog (railoffice.dyndns.org)
Post #3540
Posted 2009-06-03 16:06:00
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Today @ 13:43:19
Posts: 56, Visits: 272
I just noticed that in my original posting there was something missing. There was something appearing where the data type should be. It was: "TOTAL_AMOUNT_DUE" < UNKNOWN >.

Best Regards,
Daniel Rail

Senior Software Developer
Accra Solutions Inc.(www.accra.ca)
Accra Med Software Inc. (www.filopto.com)
Blog (railoffice.dyndns.org)
Post #3541
Posted 2009-06-03 17:10:02
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: 2010-07-21 00:21:24
Posts: 1 228, Visits: 1 373
I see. When we reverse-engineer a database we try to match each column with a persistencemapper that would result in the exact same column definition, but if we can't find one of those we use a generic mapper that just passes the dotnet value of the attribute directly down to the database with no conversion at all (except for null - DBNull.Value). This generic mapper doesn't know what columntype to use, so it is not possible to create the schema again.

One solution would be to store the verbatim column type in a tagged value for the columns that dont get an explicit mapper...

The forum doesn't correctly quote the character "<", so you need to write "&lt;". ">" works fine as long as you don't have any "<" before it.



/Jonas Hogstrom [CapableObjects]
Post #3544
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: HansKarlsen, Jonas Hogstrom

Permissions Expand / Collapse

All times are GMT +1:00, Time now is 4:08

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0,141. 6 queries. Compression Disabled.