Skip to content
This repository

Examples Don't Appear to Work #26

Closed
mlerch223 opened this Issue · 5 comments

3 participants

mlerch223 Michael Pearson bmistree
mlerch223

I know this should be run via web server, but I get the same effect either way. Run via command line for clarity.

[root@staging examples]# php address_supercolumn.php
PHP Fatal error: Call to undefined method PandraSuperColumn::setValue() in /var/www/html/Pandra/lib/ColumnContainer.class.php on line 407

Tried writing my own code based on the examples with the same issue.

Michael Pearson
Owner

Hi, sorry about that some recent changes to the api which weren't reflected in the example. Have committed a fix...
-michael

mlerch223

Yes, these are working now. Thank you!

bmistree

The address_super_column.php example still isn't working for me. When I run it, I get the error message "Required field (Keyspace, ColumnFamily or KeyID) not present." It occurs when trying to load $addrs, and arises from the pathOk function in ColumnContainer.class.php library. It goes away if I add the following lines directly after creating the new Address.

$addrs->setKeyID($keyID);
$addrs->setKeySpace($keySpace);
$addrs->setName($columnFamilyName);

However, I'm not sure that this is the intended usage: previous versions of your code functioned without needing to include those lines. I'm having trouble tracking down exactly what should be fixed. Am I misunderstanding something, or missing something? Please let me know.

Michael Pearson
Owner

can you grab the latest and give it another go? the problem with the example is that the keyspace/columnfamily wasn't being set after the original addresses() object was destroyed. I've updated the example to globalise those variables for the example and use them in the CF init()

The code base has had to evolve a little, to maintain relational integrity keyspace/name and id now need to be modified with the set() mutators. Don't worry, this won't change again.

bmistree

It worked great now. Thanks.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.