Dear all.

I'm new to symphony and i have been reading the Joobet tutorial to
make my first symphony application.

i have the following  schema related with the invoice model, with
these classes;

Client, invoice, invoice lines.
Invoiceline:
  connection: doctrine
  tableName: invoiceline
  columns:
    id:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: false
    idinvoice:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: false
    idproduto:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    quatidade:
      type: integer(4)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    total:
      type: float()
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    Produto:
      local: idproduto
      foreign: id
      type: one
    Invoice:
      local: idinvoice
      foreign: id
      type: one
Invoice:
  connection: doctrine
  tableName: invoice
  columns:
    id:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: true
    idclient:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    data:
      type: date(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    valortotal:
      type: float()
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    descricao:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    ficheiro:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    Client:
      local: idclient
      foreign: id
      type: one
    Invoiceline:
      local: id
      foreign: idinvoice
      type: many
Client:
  connection: doctrine
  tableName: client
  columns:
    id:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: true
      autoincrement: true
    categoria_id:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    pagtipo_id:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    identificacao:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    nome:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    nif:
      type: integer(8)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    morada_cc:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    morada_ii:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    telefone:
      type: string(14)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    entrada:
      type: date
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    saida:
      type: date
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    nascimento:
      type: date
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    foto:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    activo:
      type: integer(1)
      fixed: false
      unsigned: false
      primary: false
      default: '1'
      notnull: true
      autoincrement: false
    email:
      type: string(255)
      fixed: false
      unsigned: false
      primary: false
      notnull: false
      autoincrement: false
    created_at:
      type: timestamp(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
    updated_at:
      type: timestamp(25)
      fixed: false
      unsigned: false
      primary: false
      notnull: true
      autoincrement: false
  relations:
    Categoria:
      local: categoria_id
      foreign: id
      type: one
    Pagtipo:
      local: pagtipo_id
      foreign: id
      type: one
    Invoice:
      local: id
      foreign: idinvoice
      type: many



I can create new invoice but i can not create new invoice line because
a don't know how to pass the invoice automatic generated id to the
invoice_lines.
is there a way that when saving the invoice the model automatic saves
the the invoice lines with the corresponding invoice id?
Or how to send and retrieve the invoice id in the new action?

thanks  you.


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to