Re: Struts and Hibernate

2006-07-03 Thread Adam Hardy
Hi David, there is no default mechanism to get struts to manipulate a Hibernate pojo with child objects like that. You have to manually find the user from lesUtilisateurs and then set it on the Task. You can do the read automatically though using dot notation as you have already tried. Adam

Re: Struts and Hibernate lazy

2005-08-10 Thread Konrad Billewicz
Gareth Evans msoft.co.uk> writes: > http://www.javalobby.org/java/forums/t20533.html While ago other kind person gave mi a link to the Hibernate web site and I solved my problem. I'll read this article later. Thank you for it. Best regards, Konrad Billewicz

Re: Struts and Hibernate lazy

2005-08-10 Thread Gareth Evans
http://www.javalobby.org/java/forums/t20533.html Marco Mistroni wrote: Hello, Could you tell me more? Which filter? Do you mean Tomcat filters? Which plugin? It's a Servlet Filter if I am correct.. Plugin is a Struts plugin If you check www.hibernate.org in FAQ there should be a link

RE: Struts and Hibernate lazy

2005-08-10 Thread Marco Mistroni
Hello, >Could you tell me more? Which filter? Do you mean Tomcat filters? Which >plugin? It's a Servlet Filter if I am correct.. Plugin is a Struts plugin If you check www.hibernate.org in FAQ there should be a link to those informations.. Regards marco -

Re: Struts and Hibernate lazy

2005-08-10 Thread Konrad Billewicz
Nick Heudecker gmail.com> writes: > The most common way to solve this problem is to use the Open Session > In View pattern, which leaves the Hibernate session open until the JSP > has finished rendering. Typically accomplished with a filter, there > is also a Struts plugin to help with this patt

Re: Struts and Hibernate lazy

2005-08-09 Thread Nick Heudecker
The most common way to solve this problem is to use the Open Session In View pattern, which leaves the Hibernate session open until the JSP has finished rendering. Typically accomplished with a filter, there is also a Struts plugin to help with this pattern. Google for "Open Session In View" and

Re: Struts and Hibernate Session

2004-05-05 Thread Joe Germuska
At 2:10 PM +0200 5/5/04, Lionel wrote: Nicolas de Amorrortu wrote: Have you tried the following? http://www.hibernate.org/43.html. this is what I was thinking about when I posted my question...but haven't tried it yet. I don't think it will solve my problem as the object I load is put in session a

Re: Struts and Hibernate Session

2004-05-05 Thread Lionel
Nicolas de Amorrortu wrote: > Have you tried the following? http://www.hibernate.org/43.html. this is what I was thinking about when I posted my question...but haven't tried it yet. I don't think it will solve my problem as the object I load is put in session and can be accessed many requests late

RE: Struts and Hibernate Session

2004-05-05 Thread Nicolas de Amorrortu
Have you tried the following? http://www.hibernate.org/43.html. Regards, Nicolás -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Lionel Sent: Miércoles, 05 de Mayo de 2004 08:58 a.m. To: [EMAIL PROTECTED] Subject: Re: Struts and Hibernate Session Joe Germuska wrote

Re: Struts and Hibernate Session

2004-05-05 Thread Lionel
Joe Germuska wrote: >> Acutally, I have put the getHibernateSession() on a ActionFormBase. >> After each SQL action (load, find...) I close the Session. >> I don't believe this is a good design and would like to improve it. > > This is actually how Hibernate is meant to be used. The session > lif

Re: Struts and Hibernate Session

2004-05-05 Thread Joe Germuska
Where is the best way to keep the current opened Hibernate Session ? -in the HttpSession of each user ? -in a singleton ? -... When to close this Session ? -after each request ? -when the HttpSession closes ? -... Acutally, I have put the getHibernateSession() on a ActionFormBase. After each SQL ac

RE: Struts and Hibernate Session

2004-05-05 Thread Marco Mistroni
Hi, My 2 cents I have written an app running on jboss that uses hibernate. The code that uses hibernate is embedded in a plugin, and a Session is open and closed after every request I m also waiting for suggestion on the topic :-) Regards marco -Original Message- Fr

RE: Struts and Hibernate

2004-04-21 Thread David Friedman
sses/com/edhand/whatever.java Regards, David -Original Message- From: Mario St-Gelais [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 10:14 PM To: Struts Users Mailing List Subject: Re: Struts and Hibernate David Friedman wrote: >Mario, > >Where is your hibernate.properties f

Re: Struts and Hibernate

2004-04-21 Thread Mario St-Gelais
David Friedman wrote: Mario, Where is your hibernate.properties file? in WEB-INF/classes or somewhere else? Regards, David -Original Message- From: Jesse Alexander (KXT) [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 5:09 AM To: 'Struts Users Mailing List' Subject:

RE: Struts and Hibernate

2004-04-21 Thread David Friedman
Mario, Where is your hibernate.properties file? in WEB-INF/classes or somewhere else? Regards, David -Original Message- From: Jesse Alexander (KXT) [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 5:09 AM To: 'Struts Users Mailing List' Subject: RE: Struts and Hiberna

RE: Struts and Hibernate

2004-04-21 Thread Jesse Alexander (KXT)
: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 8. April 2004 08:08 To: [EMAIL PROTECTED] Subject: Re: Struts and Hibernate Mario, hibernate config look like? If it's saying the dialect doesn't support identity (and MySQL clearly does -- I use it!), then I'm betting it'

Re: Struts and Hibernate

2004-04-07 Thread Joe Hertz
1:08 AM > To: Struts Users Mailing List > Subject: Re: Struts and Hibernate > > > David Friedman wrote: > > >Nick, > > > >Your problem is the "type" set in your tag. From > (RTFM) the > >page: > >http://www.hibernate.org/hib

Re: Struts and Hibernate

2004-04-07 Thread Mario St-Gelais
David Friedman wrote: Nick, Your problem is the "type" set in your tag. From (RTFM) the page: http://www.hibernate.org/hib_docs/reference/html/or-mapping.html#or-mapping- s1-4--generator See the "identity" description, which reads: identity - supports identity columns in DB2, MySQL, MS SQL

Re: Struts and Hibernate

2004-04-07 Thread Mario St-Gelais
David Friedman wrote: Nick, Your problem is the "type" set in your tag. From (RTFM) the page: http://www.hibernate.org/hib_docs/reference/html/or-mapping.html#or-mapping- s1-4--generator See the "identity" description, which reads: identity - supports identity columns in DB2, MySQL, MS SQL

RE: Struts and Hibernate - this means you, Mario! :)

2004-04-07 Thread David Friedman
Sorry Nick. Hey Mario, read the docs/primer (a nice way to say RTFM. LOL) Regards, David -Original Message- From: Nick Heudecker [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 12:42 AM To: Struts Users Mailing List Subject: Re: Struts and Hibernate You addressed it to the

Re: Struts and Hibernate

2004-04-07 Thread Nick Heudecker
; > > > > > > > > > > > > type="java.lang.String" /> > > > > > > > > -Original Message- > From: Nick Heudecker [mailto:[EMAIL PROTECTED] > Sent:

RE: Struts and Hibernate

2004-04-07 Thread David Friedman
e document section just a few lines lower under the "native" explanation) Regards, David > > > > > > > type="java.lang.String" /> > > > -Original Message----- From: Nick Heudecker [mailto:[EMAIL PROTECTED] Sent: Wednesday, Apr

Re: Struts and Hibernate

2004-04-07 Thread Nick Heudecker
The next thing I'll suggest is changing your mapping to: If that still doesn't work, your best bet is to hit the Hibernate forums: http://forum.hibernate.org/ > > > > > > > > type="java.lang.String" /> > > > > Tried both native and identi

Re: Struts and Hibernate

2004-04-07 Thread Mario St-Gelais
Nick Heudecker wrote: It sounds like you didn't configure the primary key generation correctly. I believe that MySQL supports identity keys, not sequences. Your tag should look like: OR Go here for more: http://www.hibernate.org/hib_docs/reference/html/or-mapping.html#or-mapping-s1-4--gene

Re: Struts and Hibernate

2004-04-07 Thread Nick Heudecker
It sounds like you didn't configure the primary key generation correctly. I believe that MySQL supports identity keys, not sequences. Your tag should look like: OR Go here for more: http://www.hibernate.org/hib_docs/reference/html/or-mapping.html#or-mapping-s1-4--generator On 2004-Apr-07

Re: Struts and Hibernate

2004-04-07 Thread Mario St-Gelais
David Friedman wrote: What is the contents of your hibernate.properties file (or hibernate.cfg.xml file) and in what directory did yout place it? Also, how did you create/instantiate the SessionFactory? Regards, David I used the hibernate.properties file as per the exemple : ==

RE: Struts and Hibernate

2004-04-07 Thread David Friedman
What is the contents of your hibernate.properties file (or hibernate.cfg.xml file) and in what directory did yout place it? Also, how did you create/instantiate the SessionFactory? Regards, David -Original Message- From: Mario St-Gelais [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07