Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368592 - primitive attribute-type for a virtual attribute generates non-compiling canonical metamodel code
Summary: primitive attribute-type for a virtual attribute generates non-compiling cano...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-13 16:42 EST by Karen Butzke CLA
Modified: 2022-06-09 10:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2012-01-13 16:42:03 EST
Using EclipseLink build EclipseLink-2.4.0.v20111209

I have an extensible entity that has a virtual attribute with a primitive attribute type. It is generating non-compiling canonical metamodel code. here is my example java class, eclipselink-orm.xml entity and the generated canonical metamodel class with a compile error (notice the int instead of Integer for the 
generic type)

public class Baz {

    private Map<String, Object> extensions;

    public <T> T get(String name) {
        return (T) extensions.get(name);
    }
 
    public Object set(String name, Object value) {
        return extensions.put(name, value);
    }
}
 	
<entity class="model.Baz" access="VIRTUAL">
	<attributes>
		<id name="id" attribute-type="int">
		</id>
		<basic name="name" attribute-type="String">
		</basic>
	</attributes>
 </entity>

@Generated(value="EclipseLink-2.4.0.v20111209-rNA", date="2012-01-13T16:38:02")
@StaticMetamodel(Baz.class)
public class Baz_ { 

    public static volatile SingularAttribute<Baz, int> id;
    public static volatile SingularAttribute<Baz, String> name;

}
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:21:39 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink