User's Manual

Chapter 9. Persistence Tutorial 89
9.6.3. Incorrect Attribute Mappings
When you receive an error indicating that an attribute cannot be found or an attribute name is invalid,
make sure that there are no typos. Simple typos cannot be caught by the compiler and cause many
errors.
9.6.4. Problems with Transactions
Typically, two types of mistakes occur when dealing with Transactions within the WAF.
The first type of mistake is trying to access Data Objects (and hence the database) outside of a trans-
action. This typically happens when the developer tries to write a custom dispatcher that bypasses
the standard WAF dispatcher and does not remember to include transaction management. To fix this,
make sure that the custom dispatcher properly opens and closes transactions using appropriate WAF
APIs.
The second type of mistake is the exact opposite of the first: trying to nest transactions. Unless you
have written a custom dispatcher that bypasses the standard WAF dispatcher, you should never have
to open or close a transaction. Trying to do so within the standard framework of the WAF will result
in an error. In almost all cases, developers building on top of the WAF should not try to manage their
own transactions.
For more information, see the document on Section 9.7 Transaction Management.
9.6.5. Join Paths
Common problems:
Non-continuous join paths -- the second column’s table in each join path element must match the
table of the next join path element’s first column. That is, the path must look somthing like join
A.B to C.D, join C.E to E.F In this example, table C is the last table of the first half and the
first table of the second half.
Join paths are too long -- MDSQL only supports join paths composed of 1 or 2 join path elements.
If paths are longer than that, it becomes impossible to generate events correctly given the current
implementation.
Join path does not start in the primary table -- a join path must always start in the same table as the
reference key or object key. If it does not, there is a gap and the event cannot be generated.
9.6.6. Dynamic DDL Generation
Dyanmic DDL Generation works well when the PDL is specified correctly. However, it is easy to think
that the PDL is written to represent the model correctly when in fact you are missing a simple item to
two. Below are some symptoms that you may see with your generated DDL and some suggestions as
to how you may be able to fix them.
Data Model Problem Likely Cause in PDL
Missing columns Properties were specified without a column or
join path