Prev | Current Page 571 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

manager }];
}
static var TABLE_NAME = ???Author???;
static var TABLE_IDS = [???int_id???];
private var chapterId : Int;
public var chapter(dynamic,dynamic) : Chapter;
public static var manager = new neko.db.Manager < Author > (Author);
}
And the mapping for Chapter :
class Chapter extends neko.db.Object
{
public var int_id : Int;
public var int_chapter : Int;
public var var_title : String;
static var TABLE_NAME = ???Chapter???;
static var TABLE_IDS = [???int_id???];
public static var manager = new neko.db.Manager < Chapter > (Chapter);
}
As you can see, the Chapter class isn ??™ t all that different from the original Author class, in terms of
features. The biggest difference shown in these classes are the lines that link the Author class to the
Chapter class.
(continued)
297
Chapter 11: Performing Server-Side Trickery
The following class creates a new record in the Chapter table for an author with the unique id of 1. If the
record already exists, then the data for that record is displayed.


Pages:
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583