Patches item #672865, was opened at 2003-01-23 12:22
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428710&aid=672865&group_id=40712

Category: None
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 6
Submitted By: Mark Woon (unkyaku)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix for too-long column name aliases

Initial Comment:
This is another approach to resolve the problem with
Hibernate generating column aliases that are too long.
 Instead of appending a suffix to the original name,
I've modified it so that it generates unique names. 
The change to handle this was simple enough (in
EntityPersister and MultiTableEntityPersister), but it
took a long time to figure out why loading
joined-subclasses didn't work too well.  That required
the change to Loader.

In any case, I hope this patch works out better than
the last one. Gavin, I really need a solution to this
problem since this is my only remaining problem with
Hibernate.


----------------------------------------------------------------------

>Comment By: Gavin King (oneovthafew)
Date: 2003-02-02 17:47

Message:
Logged In: YES 
user_id=384580

Okay, I have integrated this. Check the commit mailing list
to see how I changed it (your patch wasn't working for
LockMode.UPGRADE, etc).

----------------------------------------------------------------------

Comment By: Gavin King (oneovthafew)
Date: 2003-02-02 01:10

Message:
Logged In: YES 
user_id=384580

>> I can't afford to move to H2 until there's a stable version
out...

of course not, but this is not too far away. Many of the
changes in Hibernate2 are quite superficial.

----------------------------------------------------------------------

Comment By: Mark Woon (unkyaku)
Date: 2003-02-02 00:48

Message:
Logged In: YES 
user_id=435832

Hmm...  I guess having it blessed for H2 will have to be
good enough.  Please let me know what changes you made so
that I can incorporate it into my local copy.

I can't afford to move to H2 until there's a stable version
out...

----------------------------------------------------------------------

Comment By: Gavin King (oneovthafew)
Date: 2003-02-02 00:39

Message:
Logged In: YES 
user_id=384580

I have spent the last hour reviewing it carefully.
Conceptually it seems fine. I might make a couple of
changes, one for aesthetic reasons and the other to fix an
oversight. Will probably not commit it until tomorrow. I
might also choose to apply this only to the Hibernate2
source. So you might have to work with a locally patched 1.2
for the time being - that shouldn't be too painful, since I
don't plan and big changes to the 1.2 branch (only minor
bugfixes).

----------------------------------------------------------------------

Comment By: Mark Woon (unkyaku)
Date: 2003-02-01 23:52

Message:
Logged In: YES 
user_id=435832

Gavin, what's the status on this patch?

----------------------------------------------------------------------

Comment By: Mark Woon (unkyaku)
Date: 2003-01-25 21:42

Message:
Logged In: YES 
user_id=435832

Or not.  I guess I don't have delete privileges.

----------------------------------------------------------------------

Comment By: Mark Woon (unkyaku)
Date: 2003-01-25 21:41

Message:
Logged In: YES 
user_id=435832

Deleting original patch that was buggy.

----------------------------------------------------------------------

Comment By: Mark Woon (unkyaku)
Date: 2003-01-25 21:40

Message:
Logged In: YES 
user_id=435832

Ok, I've reworked the way I calculated aliases.  This time,
aliases are calculated as they're added to the table, so all
columns should have a sigle unique alias (the previous way
didn't guarantee that the column would always get the same
alias).

I've only tested against Hibernate 1.2 at this point,
although I've included a patch against Hibernate 2.  I'm not
quite ready to move to Hibernate 2 yet (maybe in a month or
so).  Until then, I can't really do any H2 tests.  All I can
say is the H2 patch compiles...

----------------------------------------------------------------------

Comment By: Gavin King (oneovthafew)
Date: 2003-01-25 01:34

Message:
Logged In: YES 
user_id=384580

You noticed this comment:

    // Get the persister for the _subclass_

That is actually critical. The persister you pass in is the 
persister of the root class. Potentially the object we are 
hydrating is of a subclass, and has a different persister.

So this patch breaks stuff.

Other than that, I think the patch is a reasonable approach. 
However, please produce *two* patches, one for Hibernate2, 
one for Hibernate 1.2. I can't introduce this change in 1.2 only.

THanks :)

Gavin


----------------------------------------------------------------------

Comment By: Gavin King (oneovthafew)
Date: 2003-01-24 01:41

Message:
Logged In: YES 
user_id=384580

THanks :)

I'll look at this at the very 1st opportunity, I promise....

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428710&aid=672865&group_id=40712


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Reply via email to