It's been a long time since I used WebObjects, and the largest project
which did so was converted to Cayenne.

The exact solution is going to depend on what primary key generation
you are using with WebObjects.   If you're using native database
generation (like sequences), then all you need to do is configure
Cayenne to use the same system.

If you are using the custom webobject primary key table, then you
probably need to update Cayenne with a custom primary key generator.
I recall that Cayenne had such a generator, but you would probably
need to customize it to match the Webobjects naming conventions.

Since you're talking about the 1 and 20 issue, you are probably using sequences.
All you need to do is to change your cayenne app to use a 1 value
instead of a 20 value for the sequence increment in your model.

On Mon, Aug 8, 2011 at 6:45 PM, Joseph Senecal <sene...@apple.com> wrote:
> Thanks to the help provided from this mailing list, my prototype was done on 
> time and shows that the concept can work.
>
> The next problem to solve is how to get a Cayenne program to peacefully 
> coexist with legacy WebObjects programs that will be inserting records into 
> the same table. I can restrict the conflict to one table, but that one table 
> is central to all others and new records could be created by any process that 
> loads any of the related fact tables.
>
> The problem is that Cayenne and WebObjects use differently named sequences to 
> allocate primary keys. These sequences are also formatted differently because 
> WebObjects allocates primary keys one at a time where Cayenne allocates 
> primary keys 20 at the time. The obvious solution is to configure the 
> sequences for different primary key ranges. The problem is that these 
> programs will be running at over a dozen different sites, which makes 
> monitoring for exhausting of an assigned range problematic. My boss would 
> find a different solution, if one is possible.
>
> I'm sure that combining multiple ORM's has happened before. Does anyone have 
> advice as to the best way to make them play nicely together?
>
> Joe
>

Reply via email to