[Seaside] GOODS question

Ben Schroeder bschroeder at procro.com
Tue May 11 18:50:55 CEST 2004

Hi Jason,

> Specifically, evaluating the following from workspace connecting to a
> brand new GOODS database:
> | txn |
> txn := KKDatabase onHost: 'dufair.homelinux.com' port: 6100.
> txn root at: 'foo' put: #(1 2 3).
> txn commit.
> fails because "txn root" evaluates to nil.

A new GOODS database comes with a nil root.  If you assign it and then commit, your code should work fine:

	| txn txn2 |
	txn := KKDatabase onHost: 'dufair.homelinux.com' port: 6100.
	txn root: Dictionary new.
	txn commit.

	txn2 := KKDatabase onHost: 'dufair.homelinux.com' port: 6100.
	txn2 root at: 'foo' put: #(1 2 3).
	txn2 commit.

My experience has mostly been with using Dictionaries as the root, but you can use anything you can store in a GOODS database.

Hope this helps,
Ben Schroeder

More information about the Seaside mailing list