Every thing in the ADempiere Database has it's own ID. If you enter something into the Application Dictionary it may be the case that someone on the other side of the world uses in the same second the same ID. If you want to get your work together at one point it will clash. :-(
For this problem you use the Centralized ID Management.
But when should one switch it on and when switch it off? Everything you do is potentially being released t othe public so what to do? I talked about this with Red1 and CarlosRuiz and I will document it here:
Jan 22 17:47:25 <red1> and CarlosRuiz told me earlier at breakfast how to solve your IDs apetite for sex Jan 22 17:47:35 <red1> i know one million is not enough Jan 22 17:47:46 <red1> 2Pack is the way to go (if Carlos has not told u) Jan 22 17:47:50 <red1> has he? Jan 22 17:47:59 <red1> and it solved your IDs arrangement elegantly Jan 22 17:48:38 <tbayen__> You told me this works only in OSGI idempiere. Jan 22 17:49:27 <red1> no.. he is not refering to that Jan 22 17:49:34 <red1> he meant about today's work u doing Jan 22 17:49:59 <red1> see? we are discussing your work.. so your sponsorship is working for you in return Jan 22 17:50:14 <red1> i told carlos at break fast that u are right in your reply to me Jan 22 17:50:27 <red1> that u are only one working on fetching IDs and trying to build a vertical to contribute Jan 22 17:50:41 <red1> so Carlos told me that u can do that without centralised IDs turned on Jan 22 17:50:58 <red1> and then when you are done, you export out as 2Pack, and reimport or PackIn back Jan 22 17:51:05 <red1> but with the Centralised ID turned on Jan 22 17:51:05 <tbayen__> Do you mean it works because of the UUIDs that 2pack uses? Jan 22 17:51:20 <red1> so that way the IDs will be regenerated anew Jan 22 17:51:31 <red1> No, what he meant is that the present 2Pack does that Jan 22 17:51:44 <red1> think about what i said above Jan 22 17:51:59 <CarlosRuiz> first was "off" Jan 22 17:52:16 <red1> its just PackOut / PackIn Jan 22 17:52:28 <tbayen__> So 2pack in 361 does not use my IDs but uses his own system? Jan 22 17:52:32 <red1> PackOut (nromal Ids) / PackIn (turned on IDs) Jan 22 17:52:33 <CarlosRuiz> first do the usual configuration work with official IDs off / create tables windows, etc Jan 22 17:52:43 <CarlosRuiz> try to tag all of your stuff with same entitytype can make things easier Jan 22 17:52:50 <CarlosRuiz> you can create also your own entitytype Jan 22 17:53:03 <tbayen__> Yes, I have my own EntityType Jan 22 17:53:05 <CarlosRuiz> your tables preferable must have a prefix with 3 or 4 letters Jan 22 17:53:19 <tbayen__> Yes, I have a prefix of three letters Jan 22 17:53:23 <red1> i think first u need to forget about centralised IDs, till the end of your module is done Jan 22 17:53:24 <CarlosRuiz> and when you are comfortable enough with the quality of the work (tables, windows, etc) Jan 22 17:53:32 <CarlosRuiz> then you export all with a packout Jan 22 17:53:41 <CarlosRuiz> and reimport in another machine for testings Jan 22 17:53:50 <CarlosRuiz> when you're comfortable with the packin tests Jan 22 17:54:01 <CarlosRuiz> then you import in a clean database with official IDs on Jan 22 17:54:07 <CarlosRuiz> that's the way I use Jan 22 17:54:10 <CarlosRuiz> not the only Jan 22 17:54:54 <tbayen__> What IDs does packin/out use in the XML files? Jan 22 17:55:07 <CarlosRuiz> that's because initially I start making some proofs of concept / so commonly my last tables are very different from the first :-) Jan 22 17:55:35 <CarlosRuiz> packout doesn't put IDs if they are not official Jan 22 17:55:48 <CarlosRuiz> but if there are official IDs then are included in the XML and used Jan 22 17:56:03 <CarlosRuiz> so when you packout you use your own ids Jan 22 17:56:28 <CarlosRuiz> and packout won't include IDs, just identifiers Jan 22 17:56:49 <tbayen__> But packout need some IDs to connect all the packed entities together. How does it work? With these identifiers? Jan 22 17:56:51 <CarlosRuiz> when you packin in a clean db with official IDs enabled / then it will create your entries with official IDs and you log the migration script Jan 22 17:57:08 <CarlosRuiz> yes / packout-packin uses identifiers Jan 22 17:57:30 <CarlosRuiz> there are problems with some tables (but very few) that doesn't have a unique identifier Jan 22 17:58:08 <tbayen__> Thanks a lot. I talked about this with Red1 when he was here but I think he did not understand my point at this time (it was "lost in translation" I think). Jan 22 17:58:28 <red1> tbayen__: the IDs u used are generated all the time.. Centralised IDs only ensure u do not clash with others Jan 22 17:58:52 <red1> so at first what Carlos is askig u to do is to have normal IDs that will clash Jan 22 17:59:01 <CarlosRuiz> you arrived to a real conclusion / is very hard to contribute to adempiere because then you need to isolate things Jan 22 17:59:03 <red1> reimporting will always generate new IDs Jan 22 17:59:17 <red1> as Carlos asked u to apply it on _new_ instance. Jan 22 17:59:31 <CarlosRuiz> so, that's the idea that hengsin is trying to solve with UUIDs / make it easier Jan 22 18:00:06 <tbayen__> My thought was that potentially everything I use may clash later with someone else. Now I understand the way to first do my work and later grab IDs for that.