--- Prasad Iyer <[EMAIL PROTECTED]> wrote:
> Hi
> Does anyone have the example which uses bag in
> mapping file.
>
> I am facing this problem with the query.
> following is the code. Which always prints 0 for the
> size but in table there are 10 messages
>
> Session session=factory.openSession();
> InBox inbox=(InBox) session.find("from InBox inbox
> where inbox=?",
> "86c4ef27-1eea-442e-a81b-9acf808076a5",
> Hibernate.STRING).get(0);
> List lst=inbox.getMessage();
> System.out.println(lst.size());
> session.connection().commit();
> session.close();
>
> following is the xml mapping file:-
> <bag name="message" inverse="true" lazy="true"
> cascade="all">
>
> <key column="id"/>
>
> <one-to-many
> class="com.webify.eligibility.MyInbox.Message"/>
>
> </bag>
>
> can anybody help me with this I am stuck over here.
> Am I missing something over here.
>
> thanks
---%<-----------------
<bag
name="versions"
lazy="true"
inverse="false"
cascade="delete"
order-by="dateMillis"
>
<key
column="infobitid"
/>
<one-to-many
class="com.infodesire.infobit.dao.VersionImpl"
/>
</bag>
----%<-----------
One tha bagged side you need of course:
---%<------------
<many-to-one
name="infobit"
class="com.infodesire.infobit.dao.InfobitImpl"
cascade="none"
outer-join="true"
update="false"
insert="true"
column="infobitid"
not-null="true"
/>
---%<----------
=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung.
Arbeitsort: Mainz
Skills: Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel