Salut.
Je suis un débutant en Symfony et j'ai un souci avec la commande php app/console generate:doctrine:enties.
En effet, j'ai généré automatiquement mes entités avec la commande php app/console doctrine:generate:entity; puis après, j'ai ajouter manuellement le reste de mes propriétés.
Et, lorsque j'utilise la commande php app/console generate:doctrine:enties pour générer mes fichiers php, voici le message qui s’affiche :
the attribute 'type' is required for the column description of property GestionManuel\SIGTOOLSBundle\Entities\Cart::$oneToOne
Je vous remercie d'avance pour l'aide que vous m’apporterez.
Voici le code de trois de mes entités:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| GestionManuel\SIGTOOLSBundle\Entity\Cart:
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
sessionid:
type: string
lenght: 255
notnull: true
created:
type: datime
notnulle: true
oneToOne:
User:
targetEntity: User
mappedBy: Cart
oneToMany:
CartOrder:
TargetEntity: CartOrder
mappedBy: Cart
lifecycleCallbacks: { } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
| GestionManuel\SIGTOOLSBundle\Entity\User:
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
username:
type: string
lenght: 255
notnull: true
username_canonical:
type: string
lenght: 255
notnull: true
email:
type: string
lenght:255
notnull: true
email_canonical:
type: string
lenght: 255
notnull: true
enabled:
type: bigint
lenght: 1
notnull: true
algorithm:
type: string
lenght: 255
notnull: true
salt:
type: string
lenght: 255
notnull: true
password:
type: string
lenght: 255
notnull: true
last_login:
type: datetime
notnull: false
locked:
type: bigint
lenght: 1
notnull: true
expired:
type: bigint
lenght: 1
notnull: true
expires_at:
type: datetime
notnull: false
confirmation_token:
type: string
lenght: 255
notnull: false
password_requested_at:
type: datetime
notnull: false
roles:
type: text
lenght: 255
notnull: true
credentials_expired:
type: bigint
lenght: 1
notnull: true
credentials_expire_at:
type: datetime
notnull: false
name:
type: string
lenght: 255
notnull: true
firstname:
type: string
lenght: 32
notnull: true
country:
type: string
lenght: 50
notnull: true
region:
type: string
lenght: 255
notnull: true
city:
type: string
lenght: 50
notnull: true
address:
type: text
notnull: true
tel:
type: integer
lenght: 17
notnull: true
oneToOne:
OrganisationUnit:
targetEntity: OrganisationUnit
mappedBy: User
oneToMany:
UserCredential:
targetEntity: UserCredential
mappedBy: User
lifecycleCallbacks: { } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| GestionManuel\SIGTOOLSBundle\Entity\CartOrder:
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
quantity:
type: integer
lenght:255
notnull: true
oneToOne:
Cart:
targetEntity: Cart
mappedBy: CartOrder
oneToOne:
Product:
targetEntity: Product
mappedBy: CartOrder
lifecycleCallbacks: { } |
Partager