Return-Path: X-Original-To: apmail-ofbiz-user-archive@www.apache.org Delivered-To: apmail-ofbiz-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3556517A31 for ; Sun, 26 Oct 2014 09:02:27 +0000 (UTC) Received: (qmail 62121 invoked by uid 500); 26 Oct 2014 09:02:24 -0000 Delivered-To: apmail-ofbiz-user-archive@ofbiz.apache.org Received: (qmail 62089 invoked by uid 500); 26 Oct 2014 09:02:24 -0000 Mailing-List: contact user-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ofbiz.apache.org Delivered-To: mailing list user@ofbiz.apache.org Received: (qmail 62077 invoked by uid 99); 26 Oct 2014 09:02:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Oct 2014 09:02:24 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_REMOTE_IMAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lethiep.bk@gmail.com designates 209.85.212.181 as permitted sender) Received: from [209.85.212.181] (HELO mail-wi0-f181.google.com) (209.85.212.181) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Oct 2014 09:02:20 +0000 Received: by mail-wi0-f181.google.com with SMTP id n3so4145430wiv.14 for ; Sun, 26 Oct 2014 01:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UypfvV/wuHgBYmGWMk2paTuiUzynRqiDfcHvLCRbqB4=; b=KkzjtKoFTe5d122CxT7prIHeK5F++/DPRWi8vxnw9kofOZye968bADs4tEjG+iE5iD KNDRHocyCFO8hZNh0nUHeFtz+2u0Yu4QSlC1ineYuhr0kRjLTJiRwhrgWjbEsOz1aiqf dUMUKGITcgvNzF9zwNG2M/vUkFSXTlof3Ws4LKywZ3mDss4W5miUYRseQ5rzduXjkD7o Czi5HpUQ8BOmV+FTjykLvc1yjnR9D6wiYIugWUQSp+xr3himD3D0vN4gJuZCYi1NrM2c oPpW9yX6JVrwWd0A2k2YRsnbe1WEhREyVmBu+3bWlhcDrCZ1apS8JRTCMdWMbgeJ4aZC DB6A== MIME-Version: 1.0 X-Received: by 10.194.61.99 with SMTP id o3mr15390665wjr.54.1414313983800; Sun, 26 Oct 2014 01:59:43 -0700 (PDT) Received: by 10.216.155.196 with HTTP; Sun, 26 Oct 2014 01:59:43 -0700 (PDT) In-Reply-To: <8xmxyikilripxllfnbqwhplg.1414312242121@email.android.com> References: <8xmxyikilripxllfnbqwhplg.1414312242121@email.android.com> Date: Sun, 26 Oct 2014 15:59:43 +0700 Message-ID: Subject: Re: Re: Can we add auto-increment column in Ofbiz? From: =?UTF-8?B?TMOqIFbEg24gVGhp4buHcA==?= To: user@ofbiz.apache.org Content-Type: multipart/alternative; boundary=047d7ba982809afa4005064fa2f8 X-Virus-Checked: Checked by ClamAV on apache.org --047d7ba982809afa4005064fa2f8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi wulei You can use either in minilang or delegator.getNextSeqId(...) in Java. The id sequence numbers are stored in an entity SequenceValueItem. 2014-10-26 15:30 GMT+07:00 wulei.bj.cn@gmail.com : > Taher, > > Thanks so much for your opinions! Could anyone help describe 'Sequences' > more, on details of how to leverage this feature to make an column > auto-incremented? Thanks in advance. > -- > =E5=8F=91=E8=87=AA=E6=88=91=E7=9A=84ONEPLUS=E6=99=BA=E8=83=BD=E6=89=8B=E6= =9C=BA > > Taher Alkhateeb =E7=BC=96=E5=86=99=EF=BC=9A > > >Hi > > > >Two answers come to mind: > > > >1- you do not need this feature because it exists at the application lev= el > >which you can also customize with services. Sequences are one such place= . > > > >2- the whole purpose of the entity engine is to abstract the databases a= nd > >provide independebce at the application level. > > > >So my opinion is not to focus on databases ever for any kind of logic. M= y > 2 > >cents. > > > >Taher Alkhateeb > >On Oct 26, 2014 6:22 AM, "wulei.bj.cn@gmail.com" > >wrote: > > > >> Guys, > >> > >> We all know lots of databases support auto-increment columns, how can = we > >> define such columns in ofbiz's entitymodel.xml file? Or other means to > >> implement this ? > >> > >> -- > >> =E5=8F=91=E8=87=AA=E6=88=91=E7=9A=84ONEPLUS=E6=99=BA=E8=83=BD=E6=89=8B= =E6=9C=BA > --=20 *Best Regards--------------L=C3=AA V=C4=83n Thi=E1=BB=87p * *Student*Address: IT4 class, Hanoi University of Science and Technology Mobile: 01656241339 Email: ThiepLV@telsoft.com.vn || lethiep.bk@gmail.com Y! Messenger: mucdong_demdaysao_lvt My profile: Facebook --047d7ba982809afa4005064fa2f8--