Prev | Current Page 577 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

Another minor change is the inclusion of the
chapters field, which holds a reference to all the associated chapter objects, while a fairly major change
is the disappearance of the RELATIONS table. Because you no longer directly relate the tables, but instead
provide the functionality in a callback method, the standard SPOD relationship functionality is
now unusable.
The Chapter object should now look very similar, as it will need to be able to perform the reverse queries:
class Chapter extends neko.db.Object
{
public var int_id : Int;
public var int_chapter : Int;
public var var_title : String;
public var authors : List < Author > ;
static var PRIVATE_FIELDS = [???authors???];
(continued)
300
Part II: Server Side, JavaScript, and Flash: Oh My!
static var TABLE_NAME = ???Chapters???;
static var TABLE_IDS = [???int_id???];
public static var manager = new ChapterManager();
}
The callback methods needed to perform the calls to the associated record objects need to be performed
in an object that extends the neko.


Pages:
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589