Hi,
I have a problem with the mapping files, i have succesfully created the same with annotations but i require to do it with mappings also. Ive searched the forums and googled but i cant find the problem.
I am trying to persist data to an Oracle DB.
The problem I have is around a list of strings, the annotation works fine but the mapping ive found on the docs and elsewhere doesn't work. Here is the code:
Code:
@CollectionOfElements
@JoinTable(name="ADDRESS",
joinColumns = @JoinColumn(name="CUSTOMER_ADDRESS_ID"))// References parent )
@Column(name="ADDRESS_LINE", nullable=false)
private List<String> list;
Code:
<list name="list" table="ADDRESS">
<key column="CUSTOMER_ADDRESS_ID" />
<list-index column="ID" />
<element type="string" column="ADDRESS_LINE"/>
</list>
The index column should be the PK of the table that is being referenced is that correct? But basically how do i represent the above annotation in a mapping file?
Thanks for any help!