Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Use update2 pattern when I have two tables parent->child
Use update2 pattern when I have two tables parent->child [message #1342] Wed, 21 May 2008 08:00 Go to next message
Jovan is currently offline  Jovan
Messages: 24
Registered: February 2008
Location: Serbia
Junior Member

Hi Tony,
I try to respect your time, I try to develop my own Radicore application only with your documentation, and than I want to give you all my questions, but now I have a problem which stopped me in developing application.

1. I define standard Parent and child tables,type of relation is 1:0(zero)M, it means that I will have in foreign key of child table nulls. This id same structure as in tree_node in example application. I red tutorial part 4 and other text which I found in your documentation, but I could not to solve problem.
2. First I generate parent table with parent_id (unique primary), than child table with child_id (unigue primary), foreign key parent_id is null
3. Than I generate for both table list1 pattern
4. Than popup2 pattern for CHILD table
5. Than for child table list2 pattern with Outer Table name of parent table
6. Than I choose Child Forms Update2,Popup,Delete3,Search
7. At the end I choose predefined popup2 pattern

After that LIST2 works o.k, I have list child rows where parent_id is equal in both table, but I could not find a way how to list with update (popup) child which has nulls (parent_id is null). I try everything. I have tested without debugger, but I use SQL Log. I could not understand how update2 pattern works. I could not find way how to replace where string in popup list with ...parent_id is NULL. I found that the problem is in sequence of calling methods.





Jovan
Re: Use update2 pattern when I have two tables parent->child [message #1345 is a reply to message #1342] Wed, 21 May 2008 09:29 Go to previous messageGo to next message
AJM is currently online  AJM
Messages: 2276
Registered: April 2006
Location: Surrey, UK
Senior Member
An example of what you want is built into the XAMPLE system. Visit Home» PROTO» Example System» Tree Type» Tree Level» Tree Node» Child Nodes» Link Children» Choose and you will be inside a task entitled 'Choose Orphan Nodes'. This selects all nodes which currently do not have a parent (ie: parent_id is NULL).

While testing this I came across a slight bug in the code, so the file containing the fix is attached.


Re: Use update2 pattern when I have two tables parent->child [message #1361 is a reply to message #1342] Fri, 30 May 2008 06:37 Go to previous message
Jovan is currently offline  Jovan
Messages: 24
Registered: February 2008
Location: Serbia
Junior Member

Hi Tony,

Everything works, thanks a lot.



Jovan
Previous Topic: Multiple parent/child relations between 2 tables
Next Topic: Failing searches, caused by null-able date fields
Goto Forum:
  


Current Time: Thu Dec 09 09:14:13 EST 2021

Total time taken to generate the page: 0.01074 seconds