Complex Table Relations
Performing complex relations between tables, such as one - to - many and many - to - many relations, is
possible, though it requires that you build some essential SQL statements yourself. The necessary
functionality for performing such feats automatically does not yet exist within the haXe SPOD system,
and possibly never will. However, with a little fiddling and much trial and error, some workarounds can
be achieved.
In order to realize complex relations using the SPOD system, you need to look at using the options
method of the neko.db.Manager class, called in the make method for that object. Essentially, creating a
one - to - many relationship should be no different from a many - to - many relationship. The main obvious
difference is that you would initially have to cater for a list of SPOD objects within the application class
rather than a solitary SPOD object. The trick is to actually create a one - to - many query, but have each
received record make a one - to - many query in the opposite direction, calling all the original classes, thus
creating the many - to - many relationships.
Pages:
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586