You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Bahri Gencsoy <ba...@gmail.com> on 2006/01/12 23:13:12 UTC
Storing integer array
I need a simple thing, but afraid that the answer is not so simple.
How can I store retrieve int array (*int[]*) seamlessly as in the following
bean:
public class SimpleBean{
private int[] myArray;
public void setArray(int[] array){
myArray=array;
}
public int[] getArray(){
return myArray;
}
}
Which SQL data type I should use (I guess Object) and how should I write the
mapping XML file?
BTW, storing int[] in DB may not be a good practice but a fast one. I know
that I need to normalize DB.
Thanks in advance