Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Pass $data to new() method #101

Open
CrazyClicker opened this issue Oct 30, 2012 · 1 comment
Open

Pass $data to new() method #101

CrazyClicker opened this issue Oct 30, 2012 · 1 comment

Comments

@CrazyClicker
Copy link

Hello there!

I just have a small question. I'm created a document and one of it's properties have a requirement such as:

'products' => 'DocumentSet',
products.$' => array('Document:Model_Product'),

so as I understood from reading Shanty_Mongo_DocumentSet sources I simply cannot pass values to product when instantinating it like this:

$this->products->new(array('foo' => 'bar'));

So there is any reason for such behavior or it just not implemented yet?

@coen-hyde
Copy link
Owner

Hi,

You should be able to initialise a document set like that. It just hasn't been implemented. I'd welcome a pull request with tests.

Cheers,
Coen

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants