InduceModel XML invalid field types

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

InduceModel XML invalid field types

Vince Clark
I ran "Induce Model XML from Database" against a connection to a MS SQL Server database. Most of the fields mapped correctly but several came back with "invalid" in the type. Examples:
invalid-nchar:32:0
invalid-bit:1:0
invalid-int identity:10:0

Do I need to add some mappings to fieldtypemssql.xml?


Vince Clark
[hidden email]
(303) 493-6723
Reply | Threaded
Open this post in threaded view
|

Re: InduceModel XML invalid field types

David E. Jones-2

I guess it depends on what you're trying to do. If it will map to an  
existing field type (yeah, in the fieldtypemssql.xml file) then you  
can just change the XML field definition to use that type. If you need  
a type other than what is included in the OOTB data type dictionary  
(ie the types in the fieldtype*.xml files) then you'll need to add  
custom ones and refer to them in the field def.

Basically the induce model stuff just guesses at an appropriate field  
type, so it's usually a good idea to check them anyway.

-David


On Jun 11, 2009, at 2:39 PM, Vince Clark wrote:

> I ran "Induce Model XML from Database" against a connection to a MS  
> SQL Server database. Most of the fields mapped correctly but several  
> came back with "invalid" in the type. Examples:
> invalid-nchar:32:0
> invalid-bit:1:0
> invalid-int identity:10:0
>
> Do I need to add some mappings to fieldtypemssql.xml?
>
>
> Vince Clark
> [hidden email]
> (303) 493-6723

Reply | Threaded
Open this post in threaded view
|

Re: InduceModel XML invalid field types

Vince Clark
Thanks David. I manually reviewed and corrected the field types.

Next question. I just started OFBiz with my new entity definitions and database connection and am getting a sql exception when I try to look at the entity thru entity data maintenance. The relevant part of the error is:
ERROR: relation "public.my_table_name" does not exist

The problem in the error is the schema name. It seems to be defaulting to "public" even though the schema name is really "dbo". The database connection is defined with the correct schema name.

I'm not sure where else to look for this setting.


Vince Clark
[hidden email]
(303) 493-6723

----- Original Message -----
From: "David E Jones" <[hidden email]>
To: [hidden email]
Sent: Thursday, June 11, 2009 3:58:07 PM GMT -07:00 US/Canada Mountain
Subject: Re: InduceModel XML invalid field types


I guess it depends on what you're trying to do. If it will map to an  
existing field type (yeah, in the fieldtypemssql.xml file) then you  
can just change the XML field definition to use that type. If you need  
a type other than what is included in the OOTB data type dictionary  
(ie the types in the fieldtype*.xml files) then you'll need to add  
custom ones and refer to them in the field def.

Basically the induce model stuff just guesses at an appropriate field  
type, so it's usually a good idea to check them anyway.

-David


On Jun 11, 2009, at 2:39 PM, Vince Clark wrote:

> I ran "Induce Model XML from Database" against a connection to a MS  
> SQL Server database. Most of the fields mapped correctly but several  
> came back with "invalid" in the type. Examples:
> invalid-nchar:32:0
> invalid-bit:1:0
> invalid-int identity:10:0
>
> Do I need to add some mappings to fieldtypemssql.xml?
>
>
> Vince Clark
> [hidden email]
> (303) 493-6723

Reply | Threaded
Open this post in threaded view
|

Re: InduceModel XML invalid field types

Vince Clark
Figured it out. I had not created a custom entity-group.


Vince Clark
[hidden email]
(303) 493-6723

----- Original Message -----
From: "Vince Clark" <[hidden email]>
To: [hidden email]
Sent: Thursday, June 11, 2009 4:56:09 PM GMT -07:00 US/Canada Mountain
Subject: Re: InduceModel XML invalid field types

Thanks David. I manually reviewed and corrected the field types.

Next question. I just started OFBiz with my new entity definitions and database connection and am getting a sql exception when I try to look at the entity thru entity data maintenance. The relevant part of the error is:
ERROR: relation "public.my_table_name" does not exist

The problem in the error is the schema name. It seems to be defaulting to "public" even though the schema name is really "dbo". The database connection is defined with the correct schema name.

I'm not sure where else to look for this setting.


Vince Clark
[hidden email]
(303) 493-6723

----- Original Message -----
From: "David E Jones" <[hidden email]>
To: [hidden email]
Sent: Thursday, June 11, 2009 3:58:07 PM GMT -07:00 US/Canada Mountain
Subject: Re: InduceModel XML invalid field types


I guess it depends on what you're trying to do. If it will map to an  
existing field type (yeah, in the fieldtypemssql.xml file) then you  
can just change the XML field definition to use that type. If you need  
a type other than what is included in the OOTB data type dictionary  
(ie the types in the fieldtype*.xml files) then you'll need to add  
custom ones and refer to them in the field def.

Basically the induce model stuff just guesses at an appropriate field  
type, so it's usually a good idea to check them anyway.

-David


On Jun 11, 2009, at 2:39 PM, Vince Clark wrote:

> I ran "Induce Model XML from Database" against a connection to a MS  
> SQL Server database. Most of the fields mapped correctly but several  
> came back with "invalid" in the type. Examples:
> invalid-nchar:32:0
> invalid-bit:1:0
> invalid-int identity:10:0
>
> Do I need to add some mappings to fieldtypemssql.xml?
>
>
> Vince Clark
> [hidden email]
> (303) 493-6723