doctrine / KeyValueStore

Abstraction for Key-Value to Plain Old PHP Object mapping
http://www.doctrine-project.org
MIT License
200 stars 59 forks source link

Entity storagename is in correct in storage class #5

Closed aonamrata closed 7 years ago

aonamrata commented 12 years ago

I am using keyValue lib to connect to cassandra DB(created my custom storage class cassandraStorage) in zend framework. I have an Entity class "McMessage" but my DB table (CF) is "mc_message" .

namespace CassEntities;
use Doctrine\KeyValueStore\Mapping\Annotations as KVS;

/**
 * @KVS\Entity(storageName="mc_message")
 */
class McMessage
{
    /** @KVS\Id */
    public $key;
    public $headline;
    public $body;

}

So now when i try to $manager->find() .. in my cassandraStorage->find($storageName, $key) - i get $storageName as "McMessage", whereas it should be "mc_message".

I guess the prob is that the annotation class don't extend Doctrine\Common\Annotations\Annotation.

stof commented 12 years ago

extending Doctrine\Common\Annotations\Annotation is not a requirement at all to be considered as an annotation (actually, even the ORM does not extend it anymore)