This question is locked. New answers and comments are not allowed.
Hi,
I've got a class called 'Comments', and a class called 'CommentReplies'. They are both derived from an abstract 'BaseComment' class. There is also a 'User' class with properties (and backing fields) for 'Comments' and 'CommentReplies'.
I'm using a vertical mapping strategy, so I've got a 'base_comments' table, a 'comments' table and a 'comment_replies' table.
In my 'User' class, the 'Comments' property throws an exception of type DataStoreException. The message is "Could not find prepared statement with handle -1".
When using a flat mapping strategy this works fine, by the way. It's only when I try to use a vertical mapping strategy that I encounter problems. It seems to be because the inverse field 'user_id' is only present in the 'base_comments' table and not the 'comments' table. I thought Open Access would take into account the reference columns in a base table when using a vertical mapping strategy.
Can I please have some more information on why this might be occurring, and what to do about it? I'd like to see if I can get it to work using a vertical mapping strategy. Thanks.