-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Convoluted Mapping Scenario
PostPosted: Wed Nov 01, 2006 12:18 pm 
Newbie

Joined: Wed Nov 01, 2006 12:08 pm
Posts: 2
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.