-->
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.  [ 12 posts ] 
Author Message
 Post subject: (xdoclet 2 ) Collection key clarification ( columns )
PostPosted: Tue Dec 09, 2003 11:04 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
collection key is always derived from ID property?

so columns specification is only for composite ID's,
to allow column mapping different from composite id mapping?

HIbernate is able to guess ( cook ) correct set of columns in any
case, even for composite ID?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 09, 2003 7:39 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
The types of the collection <key> can be derived from the referenced PK. The column names themselves cannot,


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 5:20 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
But not for default case?
So I can just use <key/>even for composite PK , and let hibernate to the job?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 5:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
no, the column names are always required


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 10:42 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
OK, this complicates composite ID mappings a little...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 11:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Yes, composite id stuff is hard with xdoclet.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 11:54 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
well, it seems to me that DTD ( which I'm basing new plugin upon )
is somehow not logical.

For example, index requires type only if used in map... Kind of uncool.

Would it be more logical, if there is
<index> which is always primitive and composite index,
which eats class name ( ok, I know, there is composite index already
which defines ternary assoc )

At the moment it's unclear to me, what index with several columns means in context of map ( or list... )


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 12:00 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
It makes sense for a map, since you might have a multi-column custom type.

Granted, it is not needed for a list.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 12:14 pm 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
This woule mean:
- We need tags to define custom type....
and xdoclet is not aware of those custom types. right now.

And it would be almost impossible to integrate custom type not awailable as source at build time...

And also that xdoclet2 would be unable to say to user that he
is pretty wrong with his columns. Somehow uncool....

And index for the list is always int?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 12:18 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Eh? XDoclet doesn't need to be aware of the custom types....

its just: type="MyUserType"

XDoclet just passes that straight thru.


Quote:
And also that xdoclet2 would be unable to say to user that he
is pretty wrong with his columns.


I don't think it is XDoclet's responsibility to validate this.


Quote:
And index for the list is always int?


Yes.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 12:38 pm 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
gavin wrote:
Eh? XDoclet doesn't need to be aware of the custom types....

its just: type="MyUserType"

XDoclet just passes that straight thru.


Quote:
And also that xdoclet2 would be unable to say to user that he
is pretty wrong with his columns.


I don't think it is XDoclet's responsibility to validate this.

Fine. less work for me.
Quote:

Quote:
And index for the list is always int?


Yes.


Then index tag is not necessary for list at all...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 10, 2003 12:45 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
The index element is needed, in order to define the column name.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 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.