[hibernate-issues] [Hibernate-JIRA] Created: (HBX-923) Awkward auto-completion of entities that have composite primary keys

Joseph Marques (JIRA) noreply at atlassian.com
Thu Apr 5 12:08:04 EDT 2007


Awkward auto-completion of entities that have composite primary keys
--------------------------------------------------------------------

                 Key: HBX-923
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-923
             Project: Hibernate Tools
          Issue Type: Bug
    Affects Versions: 3.2beta10
            Reporter: Joseph Marques


Here is a primary key class:

class ObjectA_PK {
     Object one;
     Object two;
}

Here is an entity class

@entity
class ObjectA {
     @Id Object one;
     @Id Object two;
     Object other;
     Object stuff;
     public ObjectA(ObjectA_PK pk) {
          one = pk.one;
          two = pk.two;
     }
}

When I try to write a query using ObjectA and request auto-completion on the alias:

SELECT a
FROM ObjectA AS a
WHERE a. <-- auto-completion here

I get two types of responses:

1) The attributes actually found in ObjectA - "other" and "stuff"
2) A special thing labeled as "_identifierMapper"

When I continue using this special token:

SELECT a
FROM ObjectA AS a
WHERE a._identifierMapper. <-- auto-completion here

I get the values in my primary key class: "one" and "two"

But I don't want a query that has the special "_identifierMapper" in it, especially when it's unnecessary.  I compared the following two queries:

SELECT a
FROM ObjectA AS a
WHERE a._identifierMapper.one

SELECT a
FROM ObjectA AS a
WHERE a.one

And they produced the exact same sql in the "Hibernate Dynamic SQL Preview" view.  So, I guess it would be nice to see the primary key fields directly in the auto-completion list for the 'a' alias.  Thus, for:

SELECT a
FROM ObjectA AS a
WHERE a. <-- auto-completion here

I want to see the list: 'one', 'two', 'other', and 'stuff'

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list