We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello ! Thanks for your product !
I'm create embeddable class for my base entity.
#[Embeddable(columnPrefix: 'property_')] final class ProductProperty { #[Column(type: 'decimal', nullable: false, default: 0, precision: 2, scale: 10)] private int $width = 0; // and others columns }
When i generate migration file with the command:
php app.php cycle:migrate
I get such a file that does not include params precision and scale params:
// Parent entity final class Product { #[Column(type: 'decimal', nullable: true, precision: 2, scale: 2)] private int $minStock = 0; #[Embedded(target: 'ProductProperty')] private ProductProperty $property; public function __construct(){ $this->property = new ProductProperty(); } } // Generated migration for 'Product' class OrmDefault503ad0138adb712888e44c220d4cf5aa extends Migration { public function up(): void { $this->table('product') ->addColumn('min_stock', 'decimal', ['nullable' => true, 'defaultValue' => null, 'precision' => 2, 'scale' => 2]); /// This property in base entity ->addColumn('property_width', 'decimal', ['nullable' => false, 'defaultValue' => 0, 'precision' => 0, 'scale' => 0]) // And this in Embedded entity } }
I will be grateful for your help!
annotated v4.1.0, orm v2.8.1, PHP 8.3
No response
The text was updated successfully, but these errors were encountered:
if i add parameters with attributes we get same behavior
#[Column(type: 'decimal', nullable: false, default: 0, attributes: ['precision' => 3, 'scale' => 11])] private int $width = 0;
Sorry, something went wrong.
could you try #[Column(type: 'decimal(3,11)')]?
#[Column(type: 'decimal(3,11)')]
This work !
Will be generated:
->addColumn('property_width', 'decimal', ['nullable' => false, 'defaultValue' => 0, 'precision' => 3, 'scale' => 11])
roxblnfk
No branches or pull requests
No duplicates 🥲.
What happened?
Hello ! Thanks for your product !
I'm create embeddable class for my base entity.
When i generate migration file with the command:
I get such a file that does not include params precision and scale params:
I will be grateful for your help!
Version
annotated v4.1.0, orm v2.8.1, PHP 8.3
ORM Schema
No response
The text was updated successfully, but these errors were encountered: