On 5/10/09 3:31 PM, [email protected] wrote:
The problem is when we try to set the id in a class using the workflow it gives 
me the aforementioned message of temporary id. I don't want to commit in the 
middle like i did before in order to get the id, or to try to manually keep the 
keys of the workflow with a custom sequence or something, or to update the id 
after commit.

You'll need to write your library so that it deals with Java objects which have 
no knowledge of how they are to be persisted in a database. Once you write code 
which operates on primary keys, you'll either need to persist the objects in a 
database already or start using UUIDs. Either way is a step away from the 
promise of an ORM: to abstract the realities of database storage from the 
objects your code deals with.

As far as your URL problem is concerned, you are pretty much sunk if your 
application has to be sessionless. Which is why any application which begins to 
have a sophisticated workflow will need to keep objects server-side within a 
session. Then you have no requirement to create URLs which embed primary keys.

In short, you are finding it hard to create and manage primary keys in your 
component mainly because it is the wrong approach for code like this.

Ari Maniatis


--

-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Reply via email to