Hi Ger-Jan,

you would use hibernate annotations for this purpose and create @onetomany, @manytomany and @manytoone relationships between those tables/objects. Have a look here http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/ and here http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#entity-mapping-association .

If you have the appfuse:source than you can look at the relationship between roles and user as an example.

Generating code than with appfuse:gen should work fine. After mapping simply try it.

Sometime you need to add custom services and managers and adjust your actions. For an understanding and as a tutorial have a look here:
http://appfuse.org/display/APF/Using+Hibernate
and here
http://appfuse.org/display/APF/Services

regards henning

[EMAIL PROTECTED] schrieb:
(Sorry for the repeat, meant to start a new thread instead of replying to an earlier one)

Hi,

First of all, many thanks to Matt and all contributing to this wonderful project. I week ago I could hardly ride a bike and now I feel like doing web app wheelies!

Is there a quick/easy way to add a simple relation to CRUD functionality in AppFuse? Having been pampered by appfuse:gen for magically generating CRUD code from form to db, I was hoping there might be an easy way to extend this to related objects.

For example, if I would want the extend the Person type in the tutorial with a company property, and I would like the values for this property to come from a separate Company object (ultimately from a separate db table holding company data) - what steps would you recommend? Is it a good idea to generate CRUD for Person and Company POJOs and then tweak the code to connect them? Are there any tutorials/examples on this?

Thanks,

Ger-Jan


---------------------------------------------------------------------
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