Well, I have often toyed with the notion of allowing Maps and Lists to be
persisted
into the same row as their containing object. However, I just ended up
thinking it
was a bad thing. Java collections are *not* of fixed size and are generally
not
intended to have any kind of notion of various element positions having
different
types.
DynaBeans has both these notions:
* a predifined "property" set
* a predefined type for each "property"
That extra structure corresponds well with Hibernate's "component" model.
"Max Rydahl Andersen"
<[EMAIL PROTECTED]> To: "Juozas
Baliuka" <[EMAIL PROTECTED]>, "Gavin King"
Sent by: <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]>
[EMAIL PROTECTED] cc:
eforge.net Subject: Re:
[Hibernate] DynaBean components
20/01/03 02:32 AM
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
**********************************************************************
Any personal or sensitive information contained in this email and
attachments must be handled in accordance with the Victorian Information
Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988
(Commonwealth), as applicable.
This email, including all attachments, is confidential. If you are not the
intended recipient, you must not disclose, distribute, copy or use the
information contained in this email or attachments. Any confidentiality or
privilege is not waived or lost because this email has been sent to you in
error. If you have received it in error, please let us know by reply
email, delete it from your system and destroy any copies.
**********************************************************************
-------------------------------------------------------
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