tags:

views:

33

answers:

2

I played a lot with Doctrine 1.2. Creating and deleting records are no problem anymore ;). But sometimes i have empty records in my database. Every field is set to NULL. I have the feeling it has something to do with relations. How can i prevent Doctrine of creating such empty entries.

+1  A: 

In your schema use the tag notnull: true to force non-empty fields and use primary: true for id's i.e.:

table:
  columns:
    id:
      primary: true
      unsigned: true
      type: integer(4)
      autoincrement: true
    field:
      type: ...
      notnull: true

I this does not help you, please put further information

jamil
A: 

This should be a Problem in Code, Doctrine itself does not create empty records. I believe you save somewhere a null filled model.

Be carefull with notnull:true as it leads to incompatibilities with Oracle, if you don't solve above Problem.

FloydThreepwood