pupsnow / dphibernate

Automatically exported from code.google.com/p/dphibernate
0 stars 0 forks source link

samples_springSample1 : merge() doesn't work -> fix by adding getHibernateTemplate().flush(); #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I share my experience with "samples_springSample1". It works pretty well
but I got problem when I tried to save an item. I'm not sure if it the best
way to fix merge Item but it solves my issue.

IN
com.universalmind.hStore.data.ItemDAO : public Item merge(Item item)

ADD
getHibernateTemplate().flush();

SO

public Item merge(Item item){
    Item _item = (Item) getHibernateTemplate().merge(item);
    getHibernateTemplate().flush();
    return _item;
}

Any idea why this issue? Maybe should not happen and then let me know some
reasons why I must do it ^^

Original issue reported on code.google.com by war...@gmail.com on 11 Aug 2009 at 8:15

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
oups see Issue 33... sorry didn't check before post :/

Original comment by war...@gmail.com on 11 Aug 2009 at 8:17

GoogleCodeExporter commented 9 years ago

Original comment by martypit...@gtempaccount.com on 15 Mar 2011 at 3:31