OK, the classnotFoundErrors apparently came from the
fact that suddenly the datasource is configured in a
separate xml applicationContext-datasource.xml. I had
to copy/paste the datasource fragment to make it work
again.

Here's what I have put in mda's project.xml:

<hibernateProxy>true</hibernateProxy>
<hibernateMaxFetchDepth>1</hibernateMaxFetchDepth>

that generates the following regarding hibernate in
applicationContext.xml:

        <property name="hibernateProperties">
            <props>
                <prop
key="hibernate.show_sql">true</prop>
                <prop
key="hibernate.dialect">net.sf.hibernate.dialect.MySQLDialect</prop>
                <prop
key="hibernate.max_fetch_depth">1</prop>
                <prop
key="hibernate.cache.use_query_cache">false</prop>
                <prop
key="hibernate.cache.provider_class">net.sf.hibernate.cache.EhCacheProvider</prop>
                <prop
key="hibernate.cache.query_cache_factory">net.sf.hibernate.cache.StandardQueryCacheFactory</prop>
            </props>
        </property>

which shows that the max_fetch_depth is working, but I
have no clue wether the proxies are now enabled.

(I am a bit nervous: I have a very important demo
tonight; everything works, but because of this
"cascading query" problem, everything is now
unacceptably slow...)

bernard
--- Carlos Cuenca <[EMAIL PROTECTED]> wrote:

> 
> This is very strange, since I am using them in all
> my proyects and it 
> works perfectly. Which Andromda version are you
> using?
> 
> Carlos
> Bernard Sirius wrote:
> 
> >Hi Carlos,
> >
> >I followed your advice, but now that proxies are
> >enabled I get a very strange NoClassDefFoundError,
> >without a stack trace:
> >
> >
> >BUILD FAILED
> >File...... C:\Documents and
>
>Settings\Candide\.maven\cache\maven-test-plugin-1.6.
> >2\plugin.jelly
> >Element... junit
> >Line...... 133
> >Column.... 41
> >java.lang.NoClassDefFoundError
> >Total time: 7 seconds
> >Finished at: Fri Mar 04 15:26:43 GMT+01:00 2005
> >
> >Besides, that doesn't explain the fact that
> one-2-one
> >relations become many-to-one...
> >
> >bernard
> >
> >--- Carlos Cuenca <[EMAIL PROTECTED]> wrote:
> >
> >  
> >
> >>Hi Bernard,
> >>
> >>to get rid of all those outer joins when creating
> a
> >>simple query, just 
> >>turn on the hibernate proxies. Namespace property
> >>"hibernateProxy=true"
> >>
> >>Carlos
> >>
> >>
> >>Bernard Sirius wrote:
> >>
> >>    
> >>
> >>>Hi!
> >>>
> >>>Again, I have this problem with hibernate: a
> simple
> >>>query generates an incredible amount of SQL. I
> was
> >>>thinking that specifying outer-join="false" would
> >>>solve this, but it doesn't as you probably guess.
> >>>
> >>>I can't figure out how to tell hibernate NOT to
> >>>eagerly load relations. It seems to be completely
> >>>ignorant of the "lazy=true" attribute.
> >>>
> >>>Now that I've set outer-join="auto", which is
> >>>AndroMDA's default, I have hibernate complain
> that
> >>>"MySQL can only use 31 tables in a join", which
> is
> >>>documented in their faq
> >>>(http://hibernate.bluemars.net/117.html#A29).
> >>>
> >>>So, as a last resort, as is stated there, I'd
> like
> >>>      
> >>>
> >>to
> >>    
> >>
> >>>try setting max_fetch_depth to 1 or 2, only I
> don't
> >>>know how to let AndroMDA specify that.
> >>>
> >>>Of course please let me know if you have other
> >>>suggestions
> >>>
> >>>bernard
> >>>
> >>>PS: the hibernate query:
> >>>
> >>>   String query = "SELECT person FROM
> >>>fractals.psychos.core.ontology.entity.PersonImpl
> "
> >>>      
> >>>
> >>+
> >>    
> >>
> >>>                  "person LEFT JOIN
> >>>      
> >>>
> >>person.properties
> >>    
> >>
> >>>as property WHERE " +
> >>>                  "property.predicate=:pred";
> >>>
> >>>the generated SQL:
> >>>
> >>>Hibernate: select userimpl0_.ID as ID,
> >>>userimpl0_.USERNAME as USERNAME, userimpl
> >>>0_.PASSWORD as PASSWORD, userimpl0_.TIMESTAMP as
> >>>TIMESTAMP, userimpl0_.PERSON_FK
> >>>as PERSON_FK, userimpl0_.THUMBNAIL_FK as
> >>>      
> >>>
> >>THUMBNAI6_,
> >>    
> >>
> >>>userimpl0_.ROLODEX_FK as R
> >>>OLODEX_FK, userimpl0_.CALENDAR_FK as CALENDAR8_
> >>>      
> >>>
> >>from
> >>    
> >>
> >>>USER userimpl0_ left outer
> >>>join PERSON personimpl1_ on
> >>>userimpl0_.PERSON_FK=personimpl1_.ID left outer
> >>>      
> >>>
> >>join
> >>    
> >>
> >>>PROPERTY properties2_ on
> >>>personimpl1_.ID=properties2_.RESOURCE_FK left
> outer
> >>>      
> >>>
> >>jo
> >>    
> >>
> >>>in ABSTRACT_OBJECT properties2__1_ on
> >>>properties2_.ID=properties2__1_.ID left ou
> >>>ter join RESOURCE properties2__2_ on
> >>>properties2_.ID=properties2__2_.ID where (p
> >>>roperties2_.PREDICATE=? )
> >>>Hibernate: select personimpl0_.ID as ID10_,
> >>>personimpl0_.FIRSTNAME as FIRSTNAME1
> >>>3_10_, personimpl0_.LASTNAME as LASTNAME13_10_,
> >>>personimpl0_.BIRTHDATE as BIRTHD
> >>>ATE13_10_, personimpl0_.MIDDLE_NAME as
> >>>MIDDLE_N5_13_10_, personimpl0_.EMAIL as E
> >>>MAIL13_10_, personimpl0_.PHONE as PHONE13_10_,
> >>>personimpl0_.MOBILE as MOBILE13_1
> >>>0_, personimpl0_.WORK_PHONE as WORK_PHONE13_10_,
> >>>personimpl0_.PERSONAL_EMAIL as
> >>>PERSONA10_13_10_, personimpl0_.ICQ_NUMBER as
> >>>ICQ_NUMBER13_10_, personimpl0_.MSN_
> >>>ID as MSN_ID13_10_, personimpl0_.SKYPE_ID as
> >>>SKYPE_ID13_10_, personimpl0_.SKYPE_
> >>>NUMBER as SKYPE_N14_13_10_, personimpl0_.FAX as
> >>>FAX13_10_, personimpl0__2_.TIMES
> >>>TAMP as TIMESTAMP0_10_,
> personimpl0__2_.CORE_M_D_FK
> >>>      
> >>>
> >>as
> >>    
> >>
> >>>CORE_M_D3_0_10_, userimpl
> >>>1_.ID as ID0_, userimpl1_.USERNAME as USERNAME0_,
> >>>userimpl1_.PASSWORD as PASSWOR
> >>>D0_, userimpl1_.TIMESTAMP as TIMESTAMP0_,
> >>>userimpl1_.PERSON_FK as PERSON_FK0_, u
> >>>serimpl1_.THUMBNAIL_FK as THUMBNAI6_0_,
> >>>userimpl1_.ROLODEX_FK as ROLODEX_FK0_, u
> >>>serimpl1_.CALENDAR_FK as CALENDAR8_0_,
> >>>      
> >>>
> >>imageimpl2_.ID
> >>    
> >>
> >>>as ID1_, imageimpl2__1_.ME
> >>>DIA_PATH as MEDIA_PATH2_1_,
> >>>imageimpl2__1_.ORIGINAL_MEDIA_PATH as
> >>>      
> >>>
> >>ORIGINAL3_2_1_
> >>    
> >>
> >>>, imageimpl2__1_.MEDIA_U_R_L as MEDIA_U_4_2_1_,
> >>>imageimpl2__1_.IS_REMOTE as IS_R
> >>>EMOTE2_1_, imageimpl2__3_.TIMESTAMP as
> >>>      
> >>>
> >>TIMESTAMP0_1_,
> >>    
> >>
> >>>imageimpl2__3_.CORE_M_D_FK
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to