hi
the thing is: i have a bean called Setor, and this bean has an attribute called
quadras, which is a collection. ok, i can retrieve the ben using hibernate, store it
in a session (now talking about struts) and go to my jsp page. there, i have this
piece of code:
<tr>
<td><bean:write name="setores" property="nome" /></td><br><br>
<td><bean:write name="setores" property="comentario" /></td><br>
</tr>
<logic:iterate id="quad" name="setores" property="quadras">
<tr>
<td><bean:write name="quad" property="nome" /></td>
<td><bean:write name="quad" property="comentario" /></td>
</tr>
</logic:iterate>
Of course, the session was set this way: ("setores", setoresObj).
so, with the bean tag, i grab the "setores" bean, and print its non-collection
attributes. then, i have to iterate over "quadras". is it the correct way? i've read
hibernate's docs and noticed i can't get this collection values if the many-to-one
association is a lazy one. how to get and iterate over this collection, then?
thanks for the attention
Ot�vio Augusto
On Wed, 24 Dec 2003 13:24:04 -0700
"David Erickson" <[EMAIL PROTECTED]> wrote:
> What kind of problem are you referring to with lazy instantiation? You can
> disable or enable it.. but if you have big lists of items that you may or
> may not use its good to leave it on..
> -David
>
> ----- Original Message -----
> From: "Ot�vio Augusto" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 24, 2003 1:16 PM
> Subject: doubt
>
>
> hi all
>
> Maybe this is an inapropriate place to ask that, but i'm gonna take the risk
> anyway. I imagine there are users who work with Struts and Hibernate, just
> like i do (i haven't found any hibernate's discussion list, so i'm posting
> this question here). is someone has ever had the "lazy instantiation"
> problem when working whith Struts + Hibernate, please, notice me.
>
>
> Thanks a lot, and, again, pardon if that was not polite.
>
> Ot�vio Augusto
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]