Eelco
Thanks again for your thoughts. Inline with this, I will look at optimizing
it and intend to switch to using LDM's.
Cheers
Niv
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Wicket-Hibernate-Related-LazyInitializationException-tp3068534p3076005.html
Sent
gain
Niv
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Wicket-Hibernate-Related-LazyInitializationException-tp3068534p3075946.html
Sent from the Users forum mailing list archive at Nabble.com.
-
To
Hi Eelco
Appreciate your time and thoughts. I guess I am going to have to look at LDM
approach, since from what yourself,James and Dan have already mentioned
that.
I noticed a pattern when it/the system throws the Exception I have to track
it closely and see if makes sense and then I guess have to
Hi Eelco
Appreciate your time and thoughts. I guess I am going to look at LDM
approach, since from what yourself,James and Dan have already mentioned
that.
Hmm...well guess you guys have pointed me the required stuff to work on will
get back with more details hopefully with the solution.
Many tha
Hi james,
Yes from the DAO after i get the person and his Set I map them into a
ArrayList and is set into a Value Object that is returned to the
client/caller.
On the front end I use this List to render and then update this list based
on user action. When user wants to Save/Update, i map them back
H Vineet
Thanks for taking the time again to respond. I appreciate every single
moment you have sent.
The reason why I add the Phone Number to a list is that, I only want to save
those numbers when the user hits the Save Button for the Person as a whole.
Lets say a Person X is looked up and loade
Yep, or least something comparable. You need to re-attach those
objects you're using to the session somehow, and often the easiest way
to do that is to just load them again if they were previously
detached. If you worry about the database being hit more than you
want, you are probably prematurely o
Why not read the "phones" into a different list that you "edit" and
when you're done, you update the entity.
On Fri, Dec 3, 2010 at 2:20 AM, Nivedan Nadaraj wrote:
> Vineet
> I have not tried that. In this scenario, it will overwrite the phone's the
> user may have added to a list on the UI and i
afaik problem is you are doing form.getmodelobject(),that form could be ajax
submitted and so you are trying to initialize associate
collection in different session..
i don't understand your 1. and 2.
why are you adding to list when user has not clicked on save ?
i think adding a new phone number
Dan,
Thanks mate. I am yet to digest all that. I am going to get back to you and
see if it all helped.
Thank you for the time
Cheers
niv
On Fri, Dec 3, 2010 at 1:06 AM, Dan Retzlaff wrote:
> Yes, copying entities from the entity's association collection into another
> collection will initializ
Hi
Yeah so at present, what I do is when the user
1. Adds a new phone number, I add this to the existing list of phoneNumbers
in the UI but yet to be persisted
2. User now clicks Save - This saves the Main object ie a Person and since
the new phone number is added to the collection while I save Pe
afaik,if your collection is lazy ,you will be able to initialize it in the
same session ..
if you are trying to initialize it in a new/different session you will not
be able to initialize it..
what i did was making sure that you have a associate collection which is in
the same session..
i think bet
Vineet
I have not tried that. In this scenario, it will overwrite the phone's the
user may have added to a list on the UI and is yet to be persisted. If you
know what I mean.
1, Initial fetch of Subject along with his phones ( 5 items)
2. User adds a new phone number to the subject ( 5 + 1 (yet to
Yes, copying entities from the entity's association collection into another
collection will initialize the collection. If you're still getting an LIE,
there may be another association at play (a child of Phone?).
Note that I don't fully endorse the session reattachment aspect I posted.
Not only is
do you see the exception when you try this?
@Override
protected Object load() {
// return containerForm.getModelObject().getPhoneList();
return service.getRequiredObject(*).getPhoneList(); //or any thing like it
..
}
On Thu, Dec 2, 2010 at 12:12 PM, Ni
Hi James
Thanks for the time. I use the CPM for the whole use case. Mmm..is LDM
mandatory for such a use case? Am open for thoughts just want the best way
to implement it.
Can you explain a bit further what your thought was please?
Thank you
Regards
On Thu, Dec 2, 2010 at 2:13 PM, James Carma
Hi Dan,
Thanks for your time most appreciated.
1. Option 1 as you may agree, not always is a good thing to do so I would
drop that.
2. Option 2 - I have tried this in the following manner.
As part of the look up for the Subjects via the DAO, I iterate through the
list of Person.Phones collectio
Just make sure your form's model is a LDM too.
On Thu, Dec 2, 2010 at 12:23 AM, Nivedan Nadaraj wrote:
> Hi All
>
> I am guessing this is more of a Hibernate thing/issue but if some one has
> encountered this and has a explanation that I can probably use from the
> Wicket front would be great.
>
Hi Nivedan,
Even though the subsequent requests have a Session open, the entities with
the uninitialized collections don't know about it. I'm sure if you track it
down, you can explain the "intermittent" behavior by prior access to the
collection when the original session is open.
I'd say you can
Hi All
I am guessing this is more of a Hibernate thing/issue but if some one has
encountered this and has a explanation that I can probably use from the
Wicket front would be great.
https://forum.hibernate.org/viewtopic.php?f=1&t=1008473
I have a LazyIntializationException when i page through s
20 matches
Mail list logo