Free AD0-E717 Exam Braindumps
Adobe Commerce Developer Professional Questions 31–35 (page: 8)

Updated On: 9-Feb-2026

How should a record be removed from a database which is using a model that was inherited from the \Magento\Framework\Model\AbstractModel class?

  1. Call the "unset" method on this model object
  2. Call the "remove" method on this model object
  3. Call the "delete" method on this model object

Answer(s): C

Explanation:

The "delete" method on the \Magento\Framework\Model\AbstractModel class is used to remove a record from the database. This method will also cascade the delete to any related records.



In a new release of a module, a developer decides to rename a table that was defined in the earlier versions.
Which action, if any, allows the developer to prevent data loss?

  1. Define onCreate="migrateDataFromAnotherTable(old_table_name)" attribute in the table tag.
  2. Declarative schema supports RENAME TABLE', so the data will be migrated to the new table automatically.
  3. Define the table and columns mapping in the db.schema_whitelist.json

Answer(s): A

Explanation:

To prevent data loss when renaming a table that was defined in the earlier versions of a module, the developer should define onCreate="migrateDataFromAnotherTable(old_table_name)" attribute in the table tag of the db_schema.xml file. This attribute will instruct Adobe Commerce to copy all data from the old table to the new table during installation or upgrade.

Declarative schema does not support RENAME TABLE statement, so the data will not be migrated to the new table automatically. The db.schema_whitelist.json file is used to whitelist changes that are allowed for backward compatibility, not for data migration.


Reference:

Adobe Commerce Developer Guide - Declare schema and data patches



A developer defined a new table in db.schema.xml while creating a new module.

What should be done to allow the removal of columns from the database when deleting them from db.schema.xml?

  1. The removable columns should be defined in db_schema_whitelist.json.
  2. The columns should have "removable" attribute set to "true" in the db.schema.xml.
  3. The removable columns should be defined in db.schema_blacklist.json.

Answer(s): A

Explanation:

If a developer wants to allow the removal of columns from the database when deleting them from db.schema.xml, they need to define the removable columns in the db_schema_whitelist.json file. This file will tell Magento which columns can be removed from the database.



Which attribute option restricts Catalog EAV attributes to only certain product types?

  1. show.in
  2. apply_to
  3. allowed_in

Answer(s): C

Explanation:

The allowed_in attribute restricts Catalog EAV attributes to only certain product types. This attribute can be used to prevent certain attributes from being displayed on certain product types.



Which two methods add sorting to collections inherited from the \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection class? (Choose two.)

  1. setOrder
  2. setSorting
  3. addSorting
  4. addOrder

Answer(s): A,D

Explanation:

The two methods that add sorting to collections inherited from the

\Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection class are setOrder and addOrder. These methods allow adding one or more order clauses to a collection query.

The setSorting and addSorting methods do not exist in Adobe Commerce.


Reference:

[Adobe Commerce Developer Guide - Collections]



Viewing page 8 of 17
Viewing questions 36 - 40 out of 77 questions


Post your Comments and Discuss Adobe AD0-E717 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!