Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Retrieving data from a resultset with two or more same column names.
Retrieving data from a resultset with two or more same column names. [message #1007904] Fri, 08 February 2013 00:52 Go to previous message
cerh Mising name is currently offline cerh Mising name
Messages: 6
Registered: November 2011
Junior Member
@Entity
public T1{
	@Id
	@Column(name="id")
	int id;
	
	@Column(name="name")
	String name;
	
	@JoinColumn(name = "parentId")
	@OneToOne()
	T1 parentT1;	
}


The generated sql:
SELECT t1.id, t1.name, t0.id, t0.name FROM T1 t0, T1 t1 WHERE (t0.id = t1.parentDiv)
returns the correct data,
for exapmle
t1.id=1 t1.name=name1 t0.id=0 t0.name=name0
but the object of T1 has next values id=parentT1.id=1 and name=parentT1.name=name1.
 
Read Message
Read Message
Read Message
Previous Topic:@Index with an@ElementCollection
Next Topic:Alert that DCN Took Place
Goto Forum:
  


Current Time: Thu May 23 00:08:49 EDT 2013

Powered by FUDForum. Page generated in 0.01840 seconds