-->
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: @manytomany generates incorrect sql if column name escaped
PostPosted: Thu Jun 07, 2007 4:26 am 
Newbie

Joined: Wed May 16, 2007 5:37 am
Posts: 2
Two entities joined via third entity using @manytomany

SYLIST.java
@ManyToMany( fetch = FetchType.EAGER)
@JoinTable(
name = "`sy-list-member`",
schema="PUB",
joinColumns = {@JoinColumn(name = "`list-id`")},
inverseJoinColumns = {@JoinColumn(name = "`list-member-id-code`")} )
public List<SvFund> getFunds() {

SVFUND.java
@ManyToMany(mappedBy = "funds")
public List<SyList> getMyLists() {

When returning SYLIST hibernate generates this sql:

select funds0_."list-id" as list2_1_, funds0_."list-member-id-code"........

however when attempting to return SVFUND hibernate generates this:

select mylists0_.list-member-id-code as list3_1_, mylists0_.list-id as list2_1_

In essence the escaping of the hyphenated column name works one way but not the other.

Seems a little buggish but can I work around this ??

Any assistance GREATLY appreciated


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 07, 2007 9:50 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Which version are you using?
Can you try with the latest version of Hibernate Annotations.
If it still fail ()but it sounds like an old bug), open a JIRA issue with a reproducable test case, I will need to have a look at it.

_________________
Emmanuel


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.