Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@File Annotation Problem with YAML driver #247

Closed
danielkocsan opened this issue Feb 6, 2012 · 4 comments
Closed

@File Annotation Problem with YAML driver #247

danielkocsan opened this issue Feb 6, 2012 · 4 comments

Comments

@danielkocsan
Copy link

I try to use file mapping with YAML driver, but it seems to store only the filename instead the gridFs data.

@jwage
Copy link
Member

jwage commented Feb 7, 2012

Can I see your mapping you are trying?

@danielkocsan
Copy link
Author

My yaml schema is:

Document\ProductPicture:
  collation: productPicture
  repositoryClass: Repository\ProductPicture
  customId: true
  fields:
    id:
      id: true
      strategy: AUTO
    name:
      type: string
    file:
      type: file

And the php script is:

$productPicture = new \Document\ProductPicture();
$productPicture->setFile($filePath);

$product->addProductPicture($productPicture);

$documentManager->persist($product);
$documentManager->flush(); 

@paddycarman
Copy link

I'm facing the same issue. Can any one of the experts please comment on this? Thanks.

@jmikola
Copy link
Member

jmikola commented Oct 2, 2012

@jwage: I noticed that the File annotation also defines a 'file' property (boolean true). Is it possible that this is missing from the XML/YML mappings?

@jwage jwage closed this as completed in bc62751 Oct 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants