1.11M Members

How to retrive array from database

 
0
 

I have stored an array in database field name "exp_values" like :

[{"concentration":"30","answers":60},{"concentration":"30","answers":60},{"concentration":"30","answers":60}]

and I want to retrieve from database I am using spring and I created pojo(bean) class like

public class ExperimentParameterBean {
	
	private String username;
	private String[] exp_values;	
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String[] getExp_values() {
		return exp_values;
	}
	public void setExp_values(String[] arrayData) {
		this.exp_values = arrayData;
	}	

}

and also I used hibernate for retrieving values from database I want these array as it is
in java how can I do?

 
0
 

store the array as a blob or clob using hibernate and hibernate should take care of retrieving it for you from the database

 
0
 

store the array as a blob or clob using hibernate and hibernate should take care of retrieving it for you from the database

thanks

 
0
 

thanks

but my data is in json format then how can i store as a blob data in mysql

Question Answered as of 1 Year Ago by ejosiah
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: