Re: OneToMany cascading persist and sequence ID generator

2011-03-03 Thread Jeremy Bauer
No problem. I'm happy to hear that you are up and running. -Jeremy On Wed, Mar 2, 2011 at 11:26 PM, Phill ph...@bicispace.com wrote: Many thanks Jeremy, to my embarrassment I've discovered that lead wasn't getting set properly on the other end of the association. I jumped to the wrong

OneToMany cascading persist and sequence ID generator

2011-03-02 Thread Phill
I'm having some problems with a cascading @OneToMany persist, my class with the @ManyToOne has a sequence id generator and this Id is not getting populated in the cascaded entity. Here are the relevant snippets: Lead.java -- @SequenceGenerator(name = Lead_Id_Gen,

Re: OneToMany cascading persist and sequence ID generator

2011-03-02 Thread Jeremy Bauer
Hi Phill, What database and version of OpenJPA are you using? Also, does OpenJPA generate the tables or do you have separate DDL? -Jeremy On Wed, Mar 2, 2011 at 8:49 AM, Phill ph...@bicispace.com wrote: I'm having some problems with a cascading @OneToMany persist, my class with the

Re: OneToMany cascading persist and sequence ID generator

2011-03-02 Thread Phill
OpenJPA 2.1.0 and PostgreSQL 9 I have separate DDL. Phill On 02/mar/2011, at 16.22, Jeremy Bauer wrote: Hi Phill, What database and version of OpenJPA are you using? Also, does OpenJPA generate the tables or do you have separate DDL? -Jeremy On Wed, Mar 2, 2011 at 8:49 AM, Phill

Re: OneToMany cascading persist and sequence ID generator

2011-03-02 Thread Phill
Yes it also uses a sequence generator. SurveyAnswer.java @SequenceGenerator(name = Survey_Result_Id_Gen, sequenceName = survey_result_seq, allocationSize = 10) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = Survey_Result_Id_Gen) @Column(name = result_id) protected long