What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi all, If any can have idea and help on the error like Thank you

U04LVRPA98C
U04LVRPA98C Posts: 10 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi all,
If any can have idea and help on the error like
Thank you

Comments

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    Did you run docker/sdk console propel:install to generate the DB table and the entity class?

  • U04LVRPA98C
    U04LVRPA98C Posts: 10 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes i did that

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    Can you post you schema.xml file?

  • U04LVRPA98C
    U04LVRPA98C Posts: 10 πŸ§‘πŸ»β€πŸš€ - Cadet

    <?xml version="1.0"?>
    " name="zed" xsi:noNamespaceSchemaLocation="" namespace="Orm\Zed\Antelope\Persistence" package="src.Orm.Zed.Antelope.Persistence">

    <table name="pyz_antelope" idMethod="native" allowPkInsert="true" phpName="PyzAntelope">
        <column name="id_antelope" required="true" type="INTEGER" primaryKey="true" autoIncrement="true"/>
        <column name="name" required="true" type="VARCHAR" size="255"/>
        <unique name="pyz_antelope-name">
            <unique-column name="name"/>
        </unique>
        <id-method-parameter value="pyz_antelope_pk_seq"/>
    </table>
    

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer
    edited March 2023

    And the file is placed in Zed/Antelope/Persistence/Propel/Schema/ and ends with .schema.xml?

  • U04LVRPA98C
    U04LVRPA98C Posts: 10 πŸ§‘πŸ»β€πŸš€ - Cadet

    path is src\Pyz\Shared\Training\Persistence\Propel\Schema\pyz_antelope.schema.xml

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    Shared never have DB schema definitions, only Zed has.
    Please move the file to src\Pyz\Zed\Training\Persistence\Propel\Schema\pyz_antelope.schema.xml and execute docker/sdk console propel:install

  • U04LVRPA98C
    U04LVRPA98C Posts: 10 πŸ§‘πŸ»β€πŸš€ - Cadet
  • U04LVRPA98C
    U04LVRPA98C Posts: 10 πŸ§‘πŸ»β€πŸš€ - Cadet

    it is defined here src\Pyz\Zed\Training\Persistence\Antelope\add.twig

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    Where is your add.twig placed and where would you expect it?
    All .twig files are templates and belong to the Presentation layer.
    In your module or any other module from Spryker you will find for each layer a coresponding directory.
    Presentation (display something in the backoffice): Zed/<Module>/Presentation/<ControllerName without Controller suffix>/<Action name without Action suffix>.twig
    beside that there are Persistence (DB schemas and everything to write/read from the relational database), Communication (Controller, Plugins, Forms) and Business (the actual business code).

    https://docs.spryker.com/docs/scos/dev/architecture/modules-and-application-layers.html gives a good overview about the layers

  • U04LVRPA98C
    U04LVRPA98C Posts: 10 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thank you @UL6DGRULR now its working...