how to make delegator.getNextSeqId begin from 00001 not from 10000

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to make delegator.getNextSeqId begin from 00001 not from 10000

sqlien
Hi,

I want to persist my  products, but when I invoke delegator.getNextSeqId  it generate the productId begin from 10000, 10001, 10002, ...
How to change this behaviour for beginning from 00001 and 00002, 00003, ....

Regards
Reply | Threaded
Open this post in threaded view
|

Re: how to make delegator.getNextSeqId begin from 00001 not from 10000

Bilgin Ibryam
Index: framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java
===================================================================
--- framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java (revision 29970)
+++ framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java (working copy)
@@ -93,7 +93,7 @@
     class SequenceBank {
 
         public static final long defaultBankSize = 10;
-        public static final long startSeqId = 10000;
+        public static final long startSeqId = 1;
         public static final int minWaitMillis = 5;
         public static final int maxWaitMillis = 50;
         public static final int maxTries = 5;


Regards
Bilgin Ibryam
Reply | Threaded
Open this post in threaded view
|

Re: how to make delegator.getNextSeqId begin from 00001 not from 10000

Jacques Le Roux
Administrator
Beware to check around, this may have impredictable side effects (just a check, maybe it's ok, I never tried)

Jacques

De : "Bilgin Ibryam" <[hidden email]>

>
> Index: framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java
> ===================================================================
> --- framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java (revision
> 29970)
> +++ framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java (working
> copy)
> @@ -93,7 +93,7 @@
>      class SequenceBank {
>
>          public static final long defaultBankSize = 10;
> -        public static final long startSeqId = 10000;
> +        public static final long startSeqId = 1;
>          public static final int minWaitMillis = 5;
>          public static final int maxWaitMillis = 50;
>          public static final int maxTries = 5;
>
>
> Regards
> Bilgin Ibryam
>
> --
> View this message in context:
http://www.nabble.com/how-to-make-delegator.getNextSeqId-begin-from-00001-not-from-10000-tf4514121.html#a12876508
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>