Re: Mapping class to multiple tables with entity-name (hibernate plugin)

Marcin Zajączkowski <[email protected]> Tue, 20 Mar 2007 11:36:25 +0100
Newsgroups gmane.comp.java.xdoclet-plugins
Message-ID <[email protected]>
Konstantin Priblouda wrote:
> --- Marcin ZajÄ…czkowski <[email protected]> wrote:
>> entity-name is commonly used e.g. in systems with
>> change (history) logging.
> 
> Possible solution would be to modify template
> ( if this is acceptable to have both classes in same
> hbm.xml ) to process both tags - as template is really
> modular this would be not that difficult.

It's even advised to keep it in a one file.


> ( dare to hack this? This would be
> HibernateMappingPlugin.jelly,  add iteration for 
> class inclusion with tag selection ) 

I tried and I'm able to generate section for every class tag, but ... 
content is still for the first tag.

@hibernate.class table = "ARCHIVED_CLASS" entity-name = "archived"
@hibernate.class table = "CLASS"

in .hbm there are two sections for entity named "archived".

In HibernateMappingPlugin.jelly I have something like that:

<j:forEach var="classTag" 
items="${metadata.getTagsByName('hibernate.class')}">
   <j:import uri="/Class.jelly" inherit="true"/>
</j:forEach>

It looks like problem with passing value inside Class.jelly.


Do you have an idea what could be wrong?


Regards
Marcin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-plugins-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest