Thanks for this info.  The performance problem is most likely due to the
fact that FDMS is fetching the list of films for each actor... this is
the lazy loading issue we have currently that I mentioned in a previous
post.  If we were to follow the hibernate model more closely, we'd send
"actor" instances to the client without having populated the list of
films for each actor at all.  The first "get" call made on the films
property for a given actor would then go back to the server and fetch
them.  As it is now, we'll do one query to retrieve the list of actors,
then a query for each actor to get its list of films.  For a large DB,
this is a lot of queries to do.

This is a pretty high priority feature request.  For now, the workaround
would be to modify your domain model so there is an intermediate object
but that is awkward when you are generating everything from the simple
schema. 

As to why it is not working, from the output, the "filmId" of each Film
object is getting sent to the client as a "null" value.  I am not sure
why... I can't tell if it is retrieving the values from the database as
null or if FDMS is just not getting the values from the objects
properly.  It could have something to do with the "short" data type - I
do not think we've tried id properties as short values so maybe
something is getting messed up because of that?  It might be worth
changing that to an int if that is an easy test to run.

I will try to get a chance to look at this more tomorrow.

Jeff

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Douglas McCarroll
Sent: Wednesday, November 29, 2006 11:26 AM
To: [email protected]
Subject: Re: [flexcoders] many-to-many managed association in Hibernate
destination

Jeff Vroom wrote:

 > 4) If you turn on debug logging in the server for
 > the "Endpoint.*" logging category, you'll see the
 > object graph which is sent to the client after
 > your fill. I am curious if the time is being
 > spent loading the data from the database or
 > sending data to the client, or a combination of
 > both.

Okay, I've figured out how to do this part. Results here:

http://www.brightworks.com/technology/tech_questions/hibernate_lazy_asso
ciations/debug_log_01.txt


 > If you can also turn on debug logging of the SQL
 > that hibernate is using that would help figure out
 > if we are just fetching too many objects or what.

It looks as though I do this by adding a line to
HibernateManager.java...


public void createSessionFactory(Configuration hibernateConfig,
boolean useTransactions) throws ExceptionInInitializerError
{
try
{

New Line -> hibernateConfig.setProperty("hibernate.show_sql", "true")

sessionFactory = hibernateConfig.buildSessionFactory();


Yes?






BTW, in case someone finds this someday with Google, here are some 
resources:


FDS Logging:

http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/ww
help.htm?context=LiveDocs_Parts&file=00001112.html

http://weblogs.macromedia.com/dharfleet/archives/2006/08/debugging_flex.
cfm

http://tech.groups.yahoo.com/group/flexcoders/message/56192


Hibernate Logging:

http://www.javalobby.org/java/forums/t44119.html










--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



Reply via email to