[Seaside] Seaside, Omnibase, OmnibaseSupport - markDirty failing

Wilkes Joiner wilkesjoiner at gmail.com
Mon Feb 20 14:35:14 UTC 2006


On 2/19/06, Lukas Renggli <renggli at gmail.com> wrote:
> OmniBase is very powerful, but together with Seaside it is simply
> painful. It took me months to fully understand when objects are
> commited, when they need to be marked persistent, when they need to be
> manually proxied (asPersistentReference), when they are automatically
> proxied, how they are transfered from one transaction to the other,
> etc ...


I got this working.  I learned a couple of things.  Executing the
following raises "ODBError: Object is not persistent or is a part of
composite persistent object"

|postRef|
postRef := nil.

BLGDatabase current execute:
	[postRef := BLGPost new asPersistentReference].

BLGDatabase current execute:
	[postRef title: 't1'; body: 'b1'; markDirty]

However this does not:
|postRef|
postRef := nil.

BLGDatabase current execute:
	[postRef := BLGPost new asPersistentReference].

BLGDatabase current execute:
	[postRef title: 't1'; body: 'b1'; makePersistent; markDirty]

Since my component answers with a new Post, I just broke it up into a
create component and an edit component. The method that calls the
create sends the makePersistent to the Post before adding it to the
persistent OrderedCollection.

BLGPostList>>newPost
	| post |
	post := self call: (BLGCreatePost new).
	post makePersistent.
	self listing
		add: post;
		markDirty.

There is quite a bit more to say about this and I'll try to get
something together after doing more complex stuff.

Thanks for everyones help,
Wilkes


More information about the Seaside mailing list