Joined: Wed Jun 22, 2005 5:25 am Posts: 6
|
Hibernate version:
hibernate-3.01
Name and version of the database you are using:
PostgreSQL 8.0.3
how can i map a table column that contains an array of for example floats into a variable of the type float[] in a java class?
so for example i have this test table:
\d testlist
Table "public.testlist"
Column | Type | Modifiers
--------+---------+--------------------------------------------------------------
testje | integer | not null default nextval('public.testlist_testje_seq'::text)
test | real[] |
Indexes:
"testlist_pkey" PRIMARY KEY, btree (testje)
and now i want to map that to a class like this :
public class TestList
{
private int testId;
private float[] list;
public TestList()
{
}
public int getTestId()
{
return testId;
}
public void setTestId(int testId)
{
this.testId = testId;
}
public float[] getList()
{
return list;
}
public void setList(float[] list)
{
this.list = list;
}
public String toString()
{
return "testList: " + testId;
}
}
can i accomplish this with <primitive-array> or <array> elements?
thanks
|
|