ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lê Văn Thiệp <lethiep...@gmail.com>
Subject Re: Re: Can we add auto-increment column in Ofbiz?
Date Sun, 26 Oct 2014 08:59:43 GMT
Hi wulei

You can use either <sequence-id-to-env ...> 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 <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.
> --
> 发自我的ONEPLUS智能手机
>
> Taher Alkhateeb <slidingfilaments@gmail.com>编写:
>
> >Hi
> >
> >Two answers come to mind:
> >
> >1- you do not need this feature because it exists at the application level
> >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 and
> >provide independebce at the application level.
> >
> >So my opinion is not to focus on databases ever for any kind of logic. My
> 2
> >cents.
> >
> >Taher Alkhateeb
> >On Oct 26, 2014 6:22 AM, "wulei.bj.cn@gmail.com" <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 ?
> >>
> >> --
> >> 发自我的ONEPLUS智能手机
>



-- 




*Best Regards--------------Lê Văn Thiệp *
*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:  <https://www.facebook.com/thieplv> Facebook
<https://www.facebook.com/thieplv>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message