Answer the question
In order to leave comments, you need to log in
Why doesn't doctrine create a foreign key when migrating to SQLITE?
Listen to the people, I came across such a country of garbage, I want smart people to enlighten me.
I have an ORM Doctrine project and a sqlite database
. The entity looks like this
class Repay
{
/**
* @var \Ramsey\Uuid\UuidInterface
* @ORM\Id
* @ORM\Column(type="uuid", unique=true, options={"comment":"UUID repay"})
* @ORM\GeneratedValue(strategy="CUSTOM")
* @ORM\CustomIdGenerator(class=UuidGenerator::class)
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=TradeDeal::class)
* @ORM\JoinColumn(name="trade_deal_id", referencedColumnName="id", nullable=false)
* @ORM\Column(options={"comment":"comment"})
*/
private $trade_deal_id;
CREATE TABLE repay (id CHAR(36) NOT NULL --UUID repay(DC2Type:uuid)
, trade_deal_id VARCHAR(255) NOT NULL
, PRIMARY KEY(id));
Answer the question
In order to leave comments, you need to log in
In short, I figured it out myself, a joke:
You delete this line and everything works as it should ... WTF ...
@ORM\Column(options={"comment":"comment"})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question