G
gbattine
excume me guys,
i've a problem and i need your help.
I'm developing a jsf application.
I've 2 mysql tables
experiment(id_exp(autoincremented), name, author)
sample(id_sample(autoincremented),id_exp,value)
My application performs inserting into the 2 table.
My question is:
when i do insert in experiment in my query i don't use id_exp attribute
because it's autoincremented and everythings go well.
Later i've to insert more samples entities in sample table relating to
the same experiment inserted,that is i've more samples for the same
experiment.
What have i pass in my insert query on sample for id_exp to reference
the experiment autoincremented id before inserted?
I have to do everythings in one transaction(the 2 insert queries)..
can you help me?
Thanks very much
i've a problem and i need your help.
I'm developing a jsf application.
I've 2 mysql tables
experiment(id_exp(autoincremented), name, author)
sample(id_sample(autoincremented),id_exp,value)
My application performs inserting into the 2 table.
My question is:
when i do insert in experiment in my query i don't use id_exp attribute
because it's autoincremented and everythings go well.
Later i've to insert more samples entities in sample table relating to
the same experiment inserted,that is i've more samples for the same
experiment.
What have i pass in my insert query on sample for id_exp to reference
the experiment autoincremented id before inserted?
I have to do everythings in one transaction(the 2 insert queries)..
can you help me?
Thanks very much