[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-49) Support @Entity(name="something")

Robert Watkins (JIRA) noreply at atlassian.com
Mon Jul 21 00:39:13 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30700 ] 

Robert Watkins commented on HBX-49:
-----------------------------------

Emmanuel, I've just come across this issue as well, and I can't see why the spec is getting in the way.

Just to re-iterate the issue, here's an example bean:

package org.example.Bar;

@Entity(name = "Foo")
public class FooImpl {
...
}


Good: session.createQuery("from Foo where id = 1);
Bad: session.get("Foo", 1)

In what way is the spec preventing the second example from working? The JPA spec doesn't define the session.get(String, Serializable) method - the closest it comes is the EntityManger.getReference(Class<T>, Object) method.

If it's too difficult to make the change, or the change would be likely to break existing code, then that's one thing, but don't say that it's the fault of the JPA spec that the second example doesn't work...


> Support @Entity(name="something")
> ---------------------------------
>
>                 Key: HBX-49
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-49
>             Project: Hibernate Tools
>          Issue Type: Improvement
>          Components: annotations (obsolete)
>    Affects Versions: 3.0alpha
>            Reporter: Emmanuel Bernard
>            Assignee: Emmanuel Bernard
>            Priority: Minor
>             Fix For: 3.0alpha
>
>


-- 
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