Hi all, 

I've been trying to merge our existing project to one based on OfBIZ. I've had 
a bit of succes thus far, but I've hit a snag. 

We used to run on a MySQL. I build a Database.class which had a few easy to use 
methods, which you could hand an id to retrieve an object or hand an object for 
storage. The objects themself also have a store method, which was shorthand for 
calling the Database.store() method yourself. 

A problem I'm running into right now is how to store and retrieve a pyramid of 
objects. I used to be able to call Database.get(id) which would give me an 
object, which was a child of SObject, and have a specialized method which would 
also take a class argument. The main problem is in the first retrieval method, 
the generic one. All of the find methods I can see require me to use an entity 
name, but I can't be sure which entity name I should use, unless I use at least 
one more call to the database as I would have to store yet another piece of 
information in a seperate entity. 

Is there an easier way then having to store yet another entity, and do 2 finds 
when I need to recreate an object?

Second point: Is there a method which can create an object for me? Do I need to 
subclass a specific class or use a specific method? All that I have found thus 
far is that the find methods return a genericValue. I suppose I could get all 
the values and stick them into my own object, but I'm not sure that's the 
proper way of doing it. 

Thanks for the time, help and patience. 

David van der Staak

Reply via email to