If I have a many to one unidirectional association. Does the one side of the association need to be a mapped object? Or can it be of some other type?
IOW, is this ok?
Code:
Class User
Long id
String name
Long centerID
...
Class Center
Long id
String name
User.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
... mappings ...
<many-to-one name="centerId" column="CENTER_ID" cascade="none" not-null="true" />
.... other mappings