Generate custom fixture names in Cakephp 5

Written by James McDonald

April 27, 2024

bin/cake bake fixture  --conditions "id IN (10,81)" -r -n 10000 --table trading_partners CustomTradingPartners

Use the above to export selected records to a fixture

Important: The fixture name (The CustomTradingPartners parameter in the above example) is limited to 28 characters. If you make it longer than 28 it throws a [Cake\Database\Exception\DatabaseException] Cannot describe custome_items_trading_partners_with_really_long_name_here. It has 0 columns.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Robocopy exclude Directories

Just trying to copy everything except a couple of directories from a drive to my NAS This is the secret incantation of...