You can access your Tool object simply by using a getter and an JPA
Hibernate annotation.
Read the hibernate documentation, all relationships mapping are explained.

Example :

        @OneToMany(cascade=CascadeType.ALL,
mappedBy="project",targetEntity=Tool.class)
        private List<Tool> tools = new ArrayList();

Struts Action use managers

Managers use DAO

DAO perform database operations.

You can't use manager or else in your pojo.

Read Spring + hibernate doco.

-----Message d'origine-----
De : Laurent Dejoux [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 20 juillet 2007 12:56
À : users@appfuse.dev.java.net
Objet : [appfuse-user] Can I access to a Manager (UniversalManager or
GenericManager) in a BaseObject ?


I need to execute an sql request on a instanciated object of my model. Do I
need to use a manager ? Is that possible to use a manager with an BaseObject
?

My case is :
I have 2 BaseObjects "Project" and "Tool". One Tool is connected at one
Project.
When i deals with a Project, i want to be able to get all tools connected :

List toolList = myProject.getToolList();

How to access an UniversalManager or a GenericManager in a BaseObject ?

My Appfuse conf is Basic Struts 2


Thanks for helping
--
View this message in context:
http://www.nabble.com/Can-I-access-to-a-Manager-%28UniversalManager-or-Gener
icManager%29-in-a-BaseObject---tf4116381s2369.html#a11706075
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to