RE: [flexcoders] Hibernate..
If you have an existing server-side domain model and are using Hibernate use the HibernateAssembler. If you don't have any current server-side code and just want to expose some tables in your database to clients use the SQLAssembler. It really comes down to whether it makes sense for your client app to be interacting with database tables directly, or whether you need be interacting with server-side Java classes. Hope that helps, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pradhasan Sent: Friday, January 18, 2008 8:41 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Hibernate.. Hi, I would like to know for large scale application which one is better using HibernateAssembler or SQLAssembler in data-management-config.xml. Thanks in advance.
Re: [flexcoders] hibernate + many-to-many + inserting records
Hi, I'm still struggling with a many-to-many example that I'm creating, but seeing what I've done so far may be helpful to you. My .java and .hbm.xml files were auto-created using HibernateTools (with a few tweaks) and contain files for the middle table. While I don't know Hibernate very well, I assume that HibernateTools knows what it is doing, so I assume that this code is correct. (?) You can find the entire zipped project here: http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/Bw_005.zip And here's the thread on the problems I'm having with it: http://tech.groups.yahoo.com/group/flexcoders/message/58833 Also, this blog post by Victor Rubba may be helpful: http://viconflex.blogspot.com/2006/12/many-to-many-using-fds-hibernate.html Finally, my Flex with Java page might be of some interest: http://www.brightworks.com/technology/adobe_flex/with_java.html Good luck! When you find a solution, please consider blogging about it. :-) Douglas - Douglas McCarroll CairngormDocs.org Webmaster http://www.CairngormDocs.org Flex Developer http://www.brightworks.com 617.459.3840 - michalzak81 wrote: At this point, I have hibernate working with a many-to-many relationship Here is what I have User Table - one-to-many - user_roles Table - many-to-one - roles table The retrieval of the records works fine. I can also modify and insert the records with no hassle. But my problems come when I need to insert a relationship ( a record into the user_roles table ). The Hibernate generated code only has classes for the other 2 tables, it manages the middle table on its own. Could someone please point me into the right direction as to how that should be done.
RE: [flexcoders] Hibernate 3
Haven't done it yet... been using Hibernate 2.1.8 for now in the integration layer with Flex as the presentation layer. It shouldn't be any different. What problem are you experiencing? Dimitrios "Jimmy" Gianninas RIADeveloper Optimal Payments Inc. From: Rich Tretola [mailto:[EMAIL PROTECTED] Sent: Monday, May 16, 2005 12:19 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Hibernate 3 Has anyone been able to get data using Hibernate 3 ?Rich Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Hibernate
Hi Steve, Thanks for the help. I have all of my collections mapped as lazy=false. Everything Ive tried ends with: - could not initialize proxy - the owning Session was closed org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed Any idea what I might be forgetting? Ryan From: Steven Shaw [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 12, 2005 7:22 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Hibernate You will want to watch your server log closely as you probably are getting errors in there about lazy instantiation. Putting lazy=true in your mapping file does not guarantee that the association will be instantiated. It depends in max-fetch-depth and perhaps other things. You could try using Hibernate.initialize(collection) to ensure it is initialised before allowing AMF to get at it. Steve. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [flexcoders] Hibernate
Ryan, I'd suggest that you post some of your hibernate code here [1] with the same question. You'll get a lot better Hibernate support there. That said, one important thing to keep in mind from the Flex perspective is your service interface. You should design the integration point as a course-grained service that does as much work on the server as possible (instead of lots and lots of service calls, wrap all that logic behind one clean service point). This is a fairly well known pattern for web services. I have seen services before that exposed lots of CRUD/database operations that don't provide a clean layering in the application and caused serious pain when integrating with Flex (imagine lots of synchronous calls... possible, but painful). hope that helps, ~harris [1] http://forum.hibernate.org/ --- Ryan Scott Jones [EMAIL PROTECTED] wrote: Hi Steve, Thanks for the help. I have all of my collections mapped as lazy=false. Everything I've tried ends with: - could not initialize proxy - the owning Session was closed org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed Any idea what I might be forgetting? Ryan _ From: Steven Shaw [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 12, 2005 7:22 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Hibernate You will want to watch your server log closely as you probably are getting errors in there about lazy instantiation. Putting lazy=true in your mapping file does not guarantee that the association will be instantiated. It depends in max-fetch-depth and perhaps other things. You could try using Hibernate.initialize(collection) to ensure it is initialised before allowing AMF to get at it. Steve. _ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! http://docs.yahoo.com/info/terms/ Terms of Service. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Hibernate
You will want to watch your server log closely as you probably are getting errors in there about lazy instantiation. Putting lazy=true in your mapping file does not guarantee that the association will be instantiated. It depends in max-fetch-depth and perhaps other things. You could try using Hibernate.initialize(collection) to ensure it is initialised before allowing AMF to get at it. Steve. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.