I've also often posed that question my self :) The only answer I have found is that DynaBean's can now about their properties values/type before the actual value is placed there . e..g If a Map does not contain a value for "name" it returns null. A DynaBean can return an default value of the correct type (and default could just as well be null) AND it can return information about the actual type of the property (in this example java.lang.String) where as with an map you can only assume it as "java.lang.Object"....
but is that all that great ? What are the actual advantages ? /max ----- Original Message ----- From: "Juozas Baliuka" <[EMAIL PROTECTED]> To: "Gavin King" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, January 19, 2003 4:17 PM Subject: Re: [Hibernate] DynaBean components > > > It was idea in cglib to implement true "DynaBean", but I can not find use > case for this stuff (possible as workaround for some > Bean, but not Map enabled scripting languages). > As I understand "DynaBean" form [beanutils] is some kind of adapter for map, > why do not > to use "normal" Map directly ? > > > > I added support for DynaBean components to Hibernate2. You can now > > use mappings like: > > > > <class .... > > > ..... > > <dynabean name="dynaBean" dynaclass="MyDynaClass"/> > > <property name="foo" type="string"/> > > <property name="bar" type="integer"/> > > <many-to-one name="baz" class="Baz" cascade="save-update"/> > > </dynabean> > > > > </class> > > > > Can people please try this out, to check that I didn't get anything > > wrong; I am new to DynaBeans, so I'm not sure I am using it right. > > (Like all the Jakarta stuff it is completely underdocumented.) > > > > What I didn't find was a way to do the equivalent of Class.forName() > > to retrieve a DynaClass. So Hibernate and the user code aren't > > actually using the same DynaClass instance, which is suboptimal. > > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > > are you planning your Web Server Security? Click here to get a FREE > > Thawte SSL guide and find the answers to all your SSL security issues. > > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > > _______________________________________________ > > hibernate-devel mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > ------------------------------------------------------- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel