Hello all,
I'm quite confused about how to set OpenJPA to generate my
foreign keys. The behaviour i'm obtaining is that no foreign keys are
generated unless the "<property name="openjpa.jdbc.MappingDefaults"
value="ForeignKeyDeleteAction=restrict"/>" setting is added to my
persistente.xml file. The manual clearly specifies, the mentioned
property sets the default delete on cascade action, nothing to do with
the generation of the foreign keys. In addition, this propety overrides
my annotations on the collections, making them useless. I meant, if I
set a collection like "@OneToMany(mappedBy="parentOwner",
cascade={CascadeType.ALL}, fetch=FetchType.LAZY)", I expect that the
proper foreign key is generated, along with the proper cascade option.
Is this the desired behaviour, or am i missing something?.
Thansk in advance, regards.
Confidentiality Statement:
This message is intended only for the individual or entity to which it is
addressed. It may contain privileged, confidential information which is exempt
from disclosure under applicable laws. If you are not the intended recipient,
please note that you are strictly prohibited from disseminating or distributing
this information (other than to the intended recipient) or copying this
information. If you have received this communication in error, please notify us
immediately by return email.
-----------------------------