Information générale
Titre:
Indexing on multiple fields
Someone started a thread saying that she had indexed a child table on an expression combining multiple fields, tried to relate it to the parent, and was having trouble getting RI to work. She was advised to write her own RI code in a stored procedure, and may have already done so by now (it's been a few days). By the time I had tested my solution, I'd lost the thread.
It's common to want to index the children on commonkeyfield+childorderingfield when you're not using a view. But the RI code generator tends to assume that index tags are just field names, producing strange results. In particular, you can't add a child, because it looks for something in the parent keyfield which matches the child key expression.
I have index tags for my child table on commonkeyfield and commonkeyfield+childorderingfield, with persistent relations from both of them to parentkey. The RI of the parentkey to commonkeyfield+childorderingfield is all set to ignore. The RI of the parentkey to commonkeyfield is set to cascade the things I want. I select the tags and relations I really want to use in the form data environment, but I get the correct RI without writing any stored procedures.
I'm not using views for this app because the client says it's strictly standalone, because I'm modifying code that was written without them, because they want something that works right away, which can be adjusted later, and because it's running on an old 486, and is slow enough already.
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement