Open Bugs | New Bug anonymous
Login/Register

Equi4 SoftwareEdit Bug

Title: old property count returned after GetAs with some properties deleted Status: closed
Product: Metakit Severity: -
Version: 2.4.9.2 Type: bug
Assign to:
Platform:
Win2000
Message:

File:
Description:

Messages

2004/04/01
int test(int argc, char** argv)
{
c4_Storage storage("test1.db", true);
c4_View v = storage.GetAs("test[col1:I,col2:I]");
int oldNumProperties = v.NumProperties();
v = storage.GetAs("test[col1:I]");
//storage.Commit();
int newNumProperties = v.NumProperties();
// will fail unless the storage.Commit() line is uncommented
assert(newNumProperties == oldNumProperties - 1);
return 0;
}
2004/04/07 jcw
This is correct behavior... GetAs changes properties to have a "temporary" status.
These stay around, and so does their contents, until the next commit. This can
be used to convert properties, for example.
Likewise, properties can be "added" to views during use. These too stay around
until the next commit or rollback. This in turn is useful to track cached non-persistent
details.
I understand that this way of dealing with things may be a bit surprising.

Bug Tracker © 2002 McMillan Enterprises, Inc.