-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Does CodeGenerator support idbag?
PostPosted: Tue Mar 23, 2004 9:14 pm 
Newbie

Joined: Tue Mar 23, 2004 8:53 pm
Posts: 1
I came across a problem with idbag when using CodeGenerator to generate Java sources from Map file.

Two persistent classes: Template and Definition
Relationship: many-to-many

This is the Template mapping:

Code:
<class name="persistent.model.Template" table="Template">
...........

...........
        <idbag name="definitions" table="TemplateRange" lazy="true">
            <collection-id column="id" type="long">
                <generator class="native"/>
            </collection-id>
            <key column="template_id"/>
            <many-to-many column="definition_id"  class="persistent.model.Definition" outer-join="true"/>
        </idbag>
</class>


CodeGenerator generated Template.java without error. Then I checked Template class,
Code:
public class Template implements Serializable {

    /** identifier field */
    private Long id;

    /** persistent field */
    private String name;

    /** nullable persistent field */
    private String description;
.....
}


Where is Definition? Suppose Template has a List of Definition.... If I changed idbag to Set, no problem.

Does CodeGenerator support idbag?

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 24, 2004 1:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i think it does in the current cvs

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.