I have the following classes
public class AuthorizationContext {
private int id;
private Action action;
private SubAction subAction; }
mapped to the following classes
<many-to-one name="action" class="Action" column="ACTION_CODE_ID" not-null="true" lazy="false" cascade="none"/>
<many-to-one name="sub" class="SubAction" column="SUBACTION_CODE_ID" not-null="true" lazy="false" cascade="none"/>
public class Action {
private int id;
private String name; }
public class SubAction {
private int id;
private String name; }
The problem is that the business wants our trading partners to pass in the Action and Sub Action names to our web service. I want to avoid doing a lookup every request to get the ActionId and SubActionId. Is there any way to map this relationship, or do I have to do the lookup? Based on this, I don't really see the value in having an Action and SubAction table?
Thanks,
jp4
|