You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Deyan Tsvetanov <de...@flexbrix.com> on 2010/06/11 11:45:03 UTC

EntityEngine field types


Hi guys, 

I am trying to find some description of the field types in entity
engine. Currently it supports the following: 

date
date-time
time
		
id-ne
name
id
long-varchar
comment
description
very-short
id-long-ne
id-long
id-vlong
id-vlong-ne
very-long
short-varchar
value
url
email
credit-card-number
credit-card-date
		
		
floating-point
numeric
fixed-point
currency-amount
currency-precise
			
		
indicator
		
blob
		
I mean some info about the data length, type, etc. For example what is
the difference between comment and description, name and value, id-long
and id-vlong, very-long, etc. 

All I could find is 
http://ofbiz.apache.org/docs/entity.html

but there is no such info on that page. 

Cheers, 
Deyan 







Re: EntityEngine field types

Posted by Jacques Le Roux <ja...@les7arts.com>.
At this moment I completly forgot about the not-null attribute of the field element:
<<This makes the field NOT NULL on the database (like primary key fields). It's possible to use an id-ne similiar field type. But 
rows can be added from outside of ofbiz (e.g. database manager, third party programm, etc). This patch uses the ability of a 
database to set not null constraints. Defaults to false.>>

Jacques

From: "Jacques Le Roux" <ja...@les7arts.com>
> That should be the purpose of id-ne (ne for non empty) but "while here for documentation and enforced by the entity data 
> maintenance pages and webtools, are not currently enforced by the entity engine. But they are part of the convention that we use 
> in the data model to denote ID fields that should not be empty." (between " is the official documentation)
>
> Jacques
>
> From: "Deyan Tsvetanov" <de...@flexbrix.com>
>> Right,
>>
>> 10x :)
>>
>> Another quick one:
>>
>> <field-type-def type="id-ne" sql-type="VARCHAR(20)"
>> java-type="String"><validate method="isNotEmpty"/></field-type-def>
>>
>> Is there any chance that entity engine creates a not null column in the
>> database so that isNotEmpty validation is performed there ? Or it is not
>> implemented that way.
>>
>>
>> -- Deyan
>>
>> On Fri, 2010-06-11 at 11:54 +0200, Erwan de FERRIERES wrote:
>>> Le 11/06/2010 11:45, Deyan Tsvetanov a écrit :
>>> >
>>> >
>>>
>>> > but there is no such info on that page.
>>> >
>>> > Cheers,
>>> > Deyan
>>> >
>>> Hi Deyan,
>>>
>>> take a look in framework/entity/fieldtype, and the file related to the
>>> DB you want to use.
>>>
>>> Cheers,
>>>
>>
>>
>
> 



Re: EntityEngine field types

Posted by Jacques Le Roux <ja...@les7arts.com>.
That should be the purpose of id-ne (ne for non empty) but "while here for documentation and enforced by the entity data maintenance 
pages and webtools, are not currently enforced by the entity engine. But they are part of the convention that we use in the data 
model to denote ID fields that should not be empty." (between " is the official documentation)

Jacques

From: "Deyan Tsvetanov" <de...@flexbrix.com>
> Right,
>
> 10x :)
>
> Another quick one:
>
> <field-type-def type="id-ne" sql-type="VARCHAR(20)"
> java-type="String"><validate method="isNotEmpty"/></field-type-def>
>
> Is there any chance that entity engine creates a not null column in the
> database so that isNotEmpty validation is performed there ? Or it is not
> implemented that way.
>
>
> -- Deyan
>
> On Fri, 2010-06-11 at 11:54 +0200, Erwan de FERRIERES wrote:
>> Le 11/06/2010 11:45, Deyan Tsvetanov a écrit :
>> >
>> >
>>
>> > but there is no such info on that page.
>> >
>> > Cheers,
>> > Deyan
>> >
>> Hi Deyan,
>>
>> take a look in framework/entity/fieldtype, and the file related to the
>> DB you want to use.
>>
>> Cheers,
>>
>
> 



Re: EntityEngine field types

Posted by Deyan Tsvetanov <de...@flexbrix.com>.
Right, 

10x :)

Another quick one: 

 <field-type-def type="id-ne" sql-type="VARCHAR(20)"
java-type="String"><validate method="isNotEmpty"/></field-type-def>

Is there any chance that entity engine creates a not null column in the
database so that isNotEmpty validation is performed there ? Or it is not
implemented that way.


-- Deyan 

On Fri, 2010-06-11 at 11:54 +0200, Erwan de FERRIERES wrote:
> Le 11/06/2010 11:45, Deyan Tsvetanov a écrit :
> >
> >
> 
> > but there is no such info on that page.
> >
> > Cheers,
> > Deyan
> >
> Hi Deyan,
> 
> take a look in framework/entity/fieldtype, and the file related to the 
> DB you want to use.
> 
> Cheers,
> 



Re: EntityEngine field types

Posted by Erwan de FERRIERES <er...@nereide.fr>.
Le 11/06/2010 11:45, Deyan Tsvetanov a écrit :
>
>

> but there is no such info on that page.
>
> Cheers,
> Deyan
>
Hi Deyan,

take a look in framework/entity/fieldtype, and the file related to the 
DB you want to use.

Cheers,

-- 
Erwan de FERRIERES
www.nereide.biz