Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] pojo mapping

is auto_increment a requirement for sequencing? If it is you will want to insert the Item then attach the Menu in a separate transaction (or depending on your environment just in a separate UOW). If auto increment is not a requirement then switch to a Sequence object (if available) or table based sequencing. Either of these two changes will allow the mappings I described to work for you in the way you are looking for.
--Gordon

WP Moore-Taylor wrote:
Gordon,

We can add / remove from the objects just not the tables.

What I need is a way to have the second table use the same key value as the first for its prim key. The first table is using default seq. to get its value, reading is not the problem , creating new object and storing is the problem I would like to do it via mapping, I know it can be done, did it a very long time ago in TOPLink just can not remember how.

paul



On 19/06/2009 14:33:16, Gordon Yorke (gordon.yorke@xxxxxxxxxx) wrote:
> Does your object model not have an owner attribute? Do you not need a
> relationship? I am surprised mapping the id through the owner attribute
> did not work for you? What was the problem you encountered?
> --Gordon
>
> WP Moore-Taylor wrote:
> > Sorry had already tried that with no luck, not using JPA because we
> > like pojo's and workbench.
> >
> > if you change the object to both having just id and text and only add
> > in a relation ship attribute if need be. that will do as a basic
> > example. to get the


Back to the top