Prev | Current Page 569 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

db.Manager < Author > {
public function new() {
super( Author );
}
private function make( u : Author ) {
return Author.favoriteFoodsArray = Author.faveFoods.split(???,??™);
}
private function unmake( u : Author ) {
return Author.faveFoods = Author.favoriteFoodsArray.join(???,??™);
}
}
Global Cache
Every SPOD object returned from the database is added to a global cache stored in the associated neko
.db.Manager object. The purpose of this cache is to facilitate data consistency, so that, should two SPOD
objects both contain records from the same table with the same unique identifier, then modifying the
data in one object will automatically modify the data of the second.
Adding Table Relations
As you ??™ ve seen from the neko.db.Object class methods, the SPOD system supports assigning table
relations. Now, this is pretty basic, but still useful. The idea is you can include a call to a single record in
a table where the id of that record exists in the primary record being called. This can be perpetuated; so,
for example, you can have one record link to another, which links to another, and so on.


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