Hi Patrik, Thanks for your response, the specialcases.xpt that you mention will work out perfectly for me. I do have another question: I have a many-one mapping (User->Address) and when I save user, I would like address to be saved. In hibernate, I know that its a straightforward CascadeType specification in the mapping file for that column. How would I be able to specify the same in DSL? Thanks, MS
Patrik Nordwall wrote: > > Yes, this is a trade off you often have to do when using some tools. It is > no problem to customize sculptor to support this. > > You can define the visibility of non changeable properties in > sculptor-generator.properties. > See: > http://www.fornax-platform.org/cp/display/fornax/7.+Developer%27s+Guide+%28CSC%29#7.Developer%27sGuide%28CSC%29-Visibilityofsettersfornotchangeableattributesandreferences > > This affects all non changeable properties and setting it to public might > be to open up too much. You can set it to protected and then override and > define visibility to public of the setter in the subclass, which is only > generated once. > > You can also use oAW AOP to redefine the code generation template for > these properties. > See: > http://www.fornax-platform.org/cp/display/fornax/7.+Developer%27s+Guide+%28CSC%29#7.Developer%27sGuide%28CSC%29-ChangeGenerationTemplates > This template is located in DomainObject.xpt > DEFINE notChangeablePropertySetter FOR Attribute > > /Patrik > > > jsmoni wrote: >> >> Hi, >> I am trying to use Sculptor to generate CRUD classes as described in the >> advanced tutorial. >> I noticed that for the member variable specified as a key within the >> entity, the setter is private. >> >> I assume it is for immutability after creation, but, in my application I >> should still be able to change the key attribute using the Entity bean in >> JSF beans. >> For ex, >> in the below : >> Entity Library { >> String name key >> } >> the generated signature for name in LibraryBase is private void >> setName(String name) >> >> I know I can change the name variable,by changing the method signature in >> LibraryBase. But,this file is regenerated everytime I do a clean install >> and I assume that that is not the way it is to be done it. >> What is the best practice to be able to modify these Base classes if the >> member variable is private >> >> Thanks, >> MS >> > > -- View this message in context: http://www.nabble.com/Hibernate-mapping-in-Sculptor-tp14729015s17564p14741176.html Sent from the Fornax-Platform mailing list archive at Nabble.com. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Fornax-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fornax-developer
