Daryl Stultz on 29/06/09 16:26, wrote:
On Mon, Jun 29, 2009 at 11:21 AM, Daryl Stultz <[email protected]> wrote:

 I don't see "unique" as an option to @Column and "nullable" defaults to
true. Maybe you can give me an example.


Sorry, my mistake, I see it on @JoinColumn. I now have this:

@UniqueConstraint(columnNames = "entityid")
...
@JoinColumn(name = "entityid", nullable = true, unique = true)

But it is still trying to insert 0.

Also try insertable=false updatable=false

and set the openjpa property openjpa.jdbc.SchemaFactory=native(ForeignKeys=true)

Reply via email to