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" <[email protected]>
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" <[email protected]>
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,







Reply via email to