|
|
|
Forum 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 DeveloperAccra Solutions Inc.(www.accra.ca)Accra Med Software Inc. (www.filopto.com)Blog (railoffice.dyndns.org)
|
|
|
|
|
Supreme 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]
|
|
|
|
|
Forum 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 DeveloperAccra Solutions Inc.(www.accra.ca)Accra Med Software Inc. (www.filopto.com)Blog (railoffice.dyndns.org)
|
|
|
|
|
Forum 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 DeveloperAccra Solutions Inc.(www.accra.ca)Accra Med Software Inc. (www.filopto.com)Blog (railoffice.dyndns.org)
|
|
|
|
|
Supreme 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 "<". ">" works fine as long as you don't have any "<" before it.
/Jonas Hogstrom [CapableObjects]
|
|
|
|