php - Symfony2 dublicate the id in 2 fields (id and idbis) with strategy="AUTO" -


i symfony/doctrine duplicate id in 2 different field every time record created.
possible in 1 shot (i use stragegy="auto") ?
if yes how can this?

for instence entity category have 2 attribut id (auto). on named id, other idbis.

(in exemple work on entity contains parent , children records, have idparent link children categories parent category)

if record parent category, id , idbis same integer:
=> id=2, idbis=2, idparent = null

if record child category (let parent category id=2) then:
=> id=3, idparent=2, idcategory1=2

that great because then retrieve categories (parent , children) linked category id 2.

you should take nested set structures. it's made retrieve sub elements in simple query using bounds.

otherwise can creating trigger on insert/update.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -