Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339195 - generate-ddl @ElementCollection<@Embeddable> creates Table with wrong datatype (VARCHAR instead of TIMESTAMP)
Summary: generate-ddl @ElementCollection<@Embeddable> creates Table with wrong datatyp...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 06:01 EST by Jörg Schömer CLA
Modified: 2022-06-09 10:02 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Schömer CLA 2011-03-08 06:01:20 EST
Build Identifier: 2.2.0

The Model below should create two tables like:

CREATE TABLE A_TAB (ID NUMBER(19), NAME VARCHAR(255))
CREATE TABLE A_EVENTS (A_ID NUMBER(19), WHO VARCHAR(255), WHEN TIMESTAMP)

but EclipseLink generates the these:

CREATE TABLE A_TAB (ID NUMBER(19), NAME VARCHAR(255))
CREATE TABLE A_EVENTS (A_ID NUMBER(19), WHO VARCHAR(255), WHEN VARCHAR(255))

Model:

@Entity
@Table(name="A_TAB")
@SequenceGenerator(name = "A_SEQ", sequenceName = "A_SEQ")
class A {

  @Id
  @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "A_SEQ")
  Integer id;

  String name;

  @ElementCollection
  @CollectionTable(name="A_EVENTS", joinColumns={"A_ID", referencedColumnName = "ID"})
  List<Event> events;

}

@Embeddable
class Event {

  String who;

  @Temporal(TemporalType.TIMESTAMP)
  Date when;

}


Reproducible: Always

Steps to Reproduce:
see details.
Comment 1 Tom Ware CLA 2011-03-18 09:41:58 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:02:27 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink