-
1. Re: OneToMany List refresh after insert
damianharvey.damianharvey.gmail.com Feb 22, 2008 6:10 PM (in response to hvram.hvram1.gmail.com)I'm not sure if you're experiencing the problem that I faced in that (rather old and embarassing) post as it's hard to tell from your description.
Are you adding your new entity to the collection? Alternately, if you are using a @Factory and Session/Conversation scoped Bean, then you may need to force the Bean to reload (eg. calling your Bean method that does the search).
Cheers,
Damian.
-
2. Re: OneToMany List refresh after insert
keithnaas Feb 22, 2008 6:21 PM (in response to hvram.hvram1.gmail.com)Is the list a DataModel generated from the DataModel annotation?
-
3. Re: OneToMany List refresh after insert
hvram.hvram1.gmail.com Feb 22, 2008 6:39 PM (in response to hvram.hvram1.gmail.com)Hi
@Damian : Yes I am experiencing the same problem as you mentioned . I am adding a new element to the Collection and I am seeing it added in the database .@Keith : This is using a @DataModel and @Factory method . I have annotated the method that calls the search using the @Observer . I have a printf in the code that shows that this method is indeed being called
Thanks
Regards
Hari -
4. Re: OneToMany List refresh after insert
keithnaas Feb 22, 2008 7:37 PM (in response to hvram.hvram1.gmail.com)One thing to remember, the DataModel will not be updated unless the underlying data is not equals() to the data that was previously displayed on the page.
See the class level javadocs for @DataModel
-
5. Re: OneToMany List refresh after insert
mrbiggles Mar 7, 2008 8:36 PM (in response to hvram.hvram1.gmail.com)Hi,
I'm facing exactly the same problem.
Consecutive calls of EntityManager.createQuery(...) do not reflect changes in the data model that have been created with EntityManager.persist(...). When I check the database I can see the new values.
Is there a solution available for this problem?
Many Thanks, MrBiggles