-
1. Re: Unexpected update of database with entities and rich:suggestionbox
gaborj Apr 12, 2010 6:43 AM (in response to hdu)It seems your managed Entities are updated during session synchronization with your Ajax request. Actualy, why do you need this "onselect" if you only want to evaluate changes only after call to your update? You can use some detached list of objects for your GUI layer which you synchorize with your entities in update or use Hibernate's Manual Flush mode for this conversation. Also try to use eventsQueue="" and requestDelay="" attributes for your suggestionBox with some sensible values...
hope that helps...
-
2. Re: Unexpected update of database with entities and rich:suggestionbox
hdu Apr 14, 2010 11:31 PM (in response to hdu)Thanks. It was the automatic flushing that caused the immediate updates. I have set it to manual flush mode.
Another problem with the above suggestionbox is that it is also updating Course.name. It should only be setting PersonCourse.course
@Entity public class PersonCourse { private int id; private Course course; ... } @Entity public class Course { private int id; private String name; }