Simple Objects
-----------------------
Q1. My data appears encoded when I look directly in the database
A1.
http://www.phpobjectgenerator.com/plog/tutorials/54/troubleshooting-data-appears-encoded
A1.
http://www.phpobjectgenerator.com/plog/article/116/searching-base64-encoded-text
Q2. GetList() is slow when I have a lot of records:
A2. Correct. If you are doing sorting during GetList(), the function
has performance issues when 10K + objects are involved. We are working
on optimizations for the next version.
Q3. What are other known limitations of GetList?
A3.
a) Does not support the "IN" operator.
b) Cannot specify a column name as the "value" in the
field-comparator-value array
Relations
---------------------------------
Q4. Even after calling AddChild( ), my child objects are not saved to
the database.
A4. All operations in POG require the Save( ) function to be called to
commit all changes to the database. Therefore, until Save( ) is called,
nothing is committed to the database (except SetChildList or
SetSiblingList. see below)
Q5. SetChildList and SetSiblingList do not behave intuitively.
A5. Indeed SetChildList and SetSiblingList are not as intuitive for the
first time POG user as the other CRUD methods. This is because these 2
functions perform 2 atomic actions, not a single "transaction" as the
other methods. These 2 methods first unassigns current
children/siblings as soon as they are called. The new child/sibling
list are then assigned. However, the new children/siblings are not
committed until a Save() is called. Th
Q6. AddChild and AddSibling do not behave intuitively in PHP4.
A6. The only difference between the behavior in PHP 4 vs PHP 5+ is that
in PHP4, after adding a child/sibling, if the latter is modified, the
Save() will not capture the changes. This is due to PHP 4 limitations.
Therefore, it is important to remember the following scenarios in PHP
4:
a) if you have a more than 2 object hierarchies, i.e.
parent-children-grandchildren etc, then, make sure you add the
grandchildren to the children, and then the children to the parent. If
the order is reversed, any subsequent change to the children will not
be registered.
b) if you add a sibling/child, then any change to the attributes of the
sibling/child after it has been added to the parent will not be
registered by Save()
Q7. SetParent does not work as expected
A7. SetParent should only be called if Parent has been Saved() at
least once. (so that it has an id)
We'll keep this list up-to-date and hope that this will help you.
The POG Team.