Patches item #645169, was opened at 2002-11-28 10:24
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428710&aid=645169&group_id=40712

Category: Codegen
Group: None
Status: Closed
Resolution: Out of Date
Priority: 3
Submitted By: Max R. Andersen (maxcsaucdk)
Assigned to: Nobody/Anonymous (nobody)
Summary: codegen enhancements

Initial Comment:
The following patch provides two things (sorry - 
had to do both to make it work in my reallife 
project :)




1. Codegen now generates getter/setters for 
version and timestamps (it did not do it before!) 
(a 2 line change)




2. Support for codegenname in the definition of 
class/subclasses.




3. Removed an unused and redundant paremter 
in the Render interface.




#2 makes it possible to do the following:




<class name="Person" 
codegenname="AutoPerson">


..


..




Where the codegen attribute (if provided) will be 
used by the codegenerator instead of the name 
attribute.




This makes it possible to "extend" the 
codegenerated code - and still have the option 
of "regenerating" code without messing with your 
own "extensions"




so you could have:




class Person extends AutoPerson {


 


 public Object getNonPersistedProperty() {


     return "whatever I want":


  }




}




This improves hibernates round-trip abilities! :)


----------------------------------------------------------------------

>Comment By: Max R. Andersen (maxcsaucdk)
Date: 2003-01-06 09:30

Message:
Logged In: YES 
user_id=18119

Yes - it is obsolete.


----------------------------------------------------------------------

Comment By: Gavin King (oneovthafew)
Date: 2003-01-06 07:33

Message:
Logged In: YES 
user_id=384580

This patch is now obsolete, I assume?

----------------------------------------------------------------------

Comment By: Gavin King (oneovthafew)
Date: 2002-12-06 00:47

Message:
Logged In: YES 
user_id=384580

Cool. I will integrate this for 1.2.1. Trying to make
as-minimal-as-possible changes before 1.2final.

Thanks :)

----------------------------------------------------------------------

Comment By: Max R. Andersen (maxcsaucdk)
Date: 2002-12-05 10:28

Message:
Logged In: YES 
user_id=18119

and now the patch :)


----------------------------------------------------------------------

Comment By: Max R. Andersen (maxcsaucdk)
Date: 2002-12-05 10:27

Message:
Logged In: YES 
user_id=18119

Ok - now a patch that fixes ALL problems - ah, 
almost :)




This time the codegen get's its information from


<metaattribute name="Codegen.Classname" 
value="something"/>




And now it supports/requires a fully qualified name.




Currently it is only the codegenerator that is aware of 
metaattribute tag.




It works for normal classes, and should work for 
subclass'es also.




Is this good enough for inclusion now ? :)


----------------------------------------------------------------------

Comment By: Max R. Andersen (maxcsaucdk)
Date: 2002-11-28 14:06

Message:
Logged In: YES 
user_id=18119

btw. the current implementation only support that the 
codegenname is in the same package as the "real" 
one. 




Supporting another packagename requires some 
more cumbersome work :(


----------------------------------------------------------------------

Comment By: Max R. Andersen (maxcsaucdk)
Date: 2002-11-28 14:05

Message:
Logged In: YES 
user_id=18119

Fine for me - maybe call it metaattribute/tag/info to 
emphasize it has nothing to do with 
attributes/properties ? 




It would make "future" codegen enhancments easier 
- and maybe even make it availiable thorugh the 
metadata api ?!!? :)


----------------------------------------------------------------------

Comment By: Gavin King (oneovthafew)
Date: 2002-11-28 13:42

Message:
Logged In: YES 
user_id=384580

I have committed the version/timestamp stuff.

As to the second part, rather than adding a new attribute to
<class>, can we instead add a new metadata element like:

<attribute name="CodeGenerator.className"
value="eg.AbstractFoo"/>

What do you think?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428710&aid=645169&group_id=40712


-------------------------------------------------------
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