Skip to content

How to write and read from collections #1049

Discussion options

You must be logged in to vote

From your question regarding schemas, I assume you're trying to configure which schema to use for your new collection? You can specify the name of a configuration to use for the collection.

$action = $collectionQuery->createCreate();
$action->setName('test_simple')
       ->setCollectionConfigName('techproducts');

(I prefer the above syntax, but $collectionQuery->createCreate(['name' => 'test_simple', 'collection.configName' => 'techproducts']) also works.)

If you're not sure what "name of a configuration" means here and how it relates to the schema, start with reading configsets in the ref guide.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@alexander-schranz
Comment options

Comment options

You must be logged in to vote
6 replies
@thomascorthals
Comment options

@thomascorthals
Comment options

@alexander-schranz
Comment options

@alexander-schranz
Comment options

@alexander-schranz
Comment options

Answer selected by alexander-schranz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants