cycle / entity-behavior Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Test OptimisticLock when an entity is deleting (with and without SoftDelete behavior)
Originally posted by @roxblnfk in #24 (comment)
Using example from this link: https://cycle-orm.dev/docs/entity-behaviors-optimistic-lock
#[Entity]
#[OptimisticLock(
field: 'version', // Required. By default 'version'
column: 'version', // Optional. By default 'null'. If not set, will be used information from property declaration.
rule: OptimisticLock::RULE_INCREMENT // Optional. By default OptimisticLock::RULE_INCREMENT
)]
class Page
{
#[Column(type: 'primary')]
private int $id;
#[Column(type: 'integer')]
private int $version;
}
During schema generation an error was received:
In RegistryModifier.php line 61: Field version must be of type integer
If remove attribute #[Column(type: 'integer')]
- then works.
entity-behavior v1.1.1
orm v2.2.1,
PHP 8.1
Add possibility to replace EventListener with custom implementation.
Does anyone need this?
The ORM factroy throws an exception on resolving this listener
public function __construct(
private ORMInterface $orm,
private EntityManagerInterface $em,
) {
}
The message of the exception is Spiral\Core\Exception\Container\NotFoundException: Undefined class or binding 'Cycle\ORM\ORMInterface
entity-behavior v1.1.1
orm v2.1.0,
PHP 8.1
https://cycle-orm.dev/docs/entity-behaviors-timestamps
When I used old cycle/orm: ^1
version updated_at
column always was filled with first insert. Now there is no. Bug?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.