I would recommend leaving the data model as-is. A 20 character ID
accommodates thousands of trillions of products - certainly sufficient
for most businesses.
-Adrian
On 5/2/2013 4:33 AM, Ofbiz 开发 wrote:
Hi Adrian,
So at the moment ProductID is type "id-ne", is it possible to change it to
type "id-long-ne" please? Will it affect anything else or other bad side
effect please?
And do you think using the fieldtypepostnew.xml is not a good idea, even
though it's a new system? Thank you very much for sharing your thoughts.
Kind Regards
Fong
On Wed, May 1, 2013 at 10:41 PM, Adrian Crum <
[email protected]> wrote:
On 4/30/2013 4:52 PM, Mike wrote:
Compare the following three files:
framework/entity/fieldtype/**fieldtypemysql.xml
framework/entity/fieldtype/**fieldtypepostgres.xml
framework/entity/fieldtype/**fieldtypepostnew.xml
I bet you are using mysql, or maybe even postgres, which has very LIMITED
key value lengths. In the real world, you never know what key length you
may need in the future, so why limit yourself? Now take a look at
"postnew", which uses a generic "text" type for almost all the fields. It
allows ANY key length, which allows the flexibility to create logical
relations, even for part numbers that may be 60 characters or so.
I learned this the hard way, when I came across long part numbers, and
struggled to figure out a way to logically store them. Back then I was
using mysql.
Part numbers are a GOOD IDENTIFICATION. So, you wouldn't put the part
number in a 20 character ID field. Instead, you would use the standard ID
sequence generator for the PRODUCT, then link the PRODUCT to a GOOD
IDENTIFICATION.
-Adrian