Handling Parent-Child Table Relationship Using Generated Code

You can create database application with parent-child table relationship using code generator. You can do for unlimited relationship with cascading update and delete.

Here are steps to do:

  • Generate the code for each table both for list and maintenance using process type of gencode_dblist1 and gencode_dbmaint1.

  • You need to modify the configuration file (xml) of maintenance application of the parent. You need to add callback to the action function, and child table processing. To do this, you just copy the code from the child configuration.

  • You need to modify template file (html) by add new holder for child.

  • You need to modify child template file (html) to show only what you need.

  • You need to modify the configuration file (xml) of maintenance application of the child. You need to configure control to return action to manitenance application of the parent.


Now all is ready. No code changes. You can do all of above in no more than 10 minutes.

No comments:

Post a Comment

CommentLuv Enabled

Followers