> > Thus, I'll suggest (and also make a patch as I get to it) that it
> > should be optional to have the dependency on commons-lang.
> Optimal, we
> > could generate a bare-boned toString method based on the
> > attributes/properties know to the metadata.
> >
>
> On second thought - I'll add an option to either have the
> codegenerator use the methods provided by commons-lang OR not
> do anything at all :)
>
> The "do nothing" option is for those who want to have either
> a base or their own custom subclass for their classes (nicely
> supported by my metaattribute patch :)

>Yes, I'm happy to agree to that in the case of toString().

Yup!.

>However, in the case of equals() and hashCode() for composite-id
>classes, we actually *need* them. (Its required by Hibernate.)
>I would much prefer the commons-lang dependency to trying to
>fully generate the equals() and hashCode() methods (thats
>actually *more* complicated).

Yup!

>And after this discussion, I'm leaning toward the view that
>generated entity classes should implement equals() had hashCode()
>consistent with identifier equality, though I suppose that should
>also be optional.

Yup!

> > And what about the meta-attribute thingy ? (it is not that a big
> > codechange compared to the recent commit :) (i'm just
> pushing here :)
>
> How about adding the meta-attribute thingy as an extra X-mas
> gift - it would instantly make me happy, and the
> codegenerator so much more better :)

>After this discussion I'm finally satisfied that this is a
>requirement if CodeGenerator is to become really useful. So I'm
>perfectly happy to allow things like:

Ok - an even more powerfull meta, than my patch :)
I'll start doing it right now :)

><class name="Foo" ... >
 >  <meta attribute="description">JavaDoc comment for Foo</meta>
 >  <meta attribute="base-class">AbstractPersistent</meta>
 >  <meta attribute="generated-class">FooBase</meta>

Okey - I get this one....(and those class references are meant to be fully
qualified names, right ?)
I'll even put in another one (the one that I currently need :)
  <meta attribute="implements">Validatable</meta>
  <meta attribute="implements">Auditable</meta>

or should that be   <meta attribute="implements">Validatable,
Auditable</meta>


 >  <property name="bar" type="serializable" ....>
 >      <meta attribute="description">
 >         JavaDoc comment for getBar()
 >      </meta>
 >      <meta attribute="java-type">java.lang.Object</meta>
 >  </property>
 >  .....

But this one ? Isn't this a bit "cloudy"....
If I understand this correctly you want that if "java-type" is provided the
codegenerator should
use that type instead of the type specified in the property....Just curious,
when is that usefull ?

></class>

>The only bad thing about <meta> is its not very well self-documenting.
>So we will really need a page of documentation about CodeGenerator.

I'll be happy to do both :)

>Particularly since it is now maturing quite nicely :)

Yes - it is isn't :)

/max




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to