public  void addComment(String comment, String filePath){

		Picture picture = findById(filePath);
		if(picture != null){
			System.out.print("1");	
			Comment comm = commentDao.findById(comment);
			if(comm!=null){
				System.out.print("2");	
				beginTransaction();
				List<Picture> pics;
				try{
					pics = comm.getPictures();
				}catch(Exception j){
					Log.getLogger().log(Level.INFO, "Couldn't get any pictures from Comment" + comm);
					pics =new ArrayList<Picture>();
				}
				System.out.print("3");	
				if((!pics.contains(picture)))
					pics.add(picture);
				comm.setPicture(pics);
				picture.setComment(comm);
				commitTransaction();
			}else{
				beginTransaction();
				System.out.print("5");	
				Comment com = new Comment();
				com.setComment(comment);
				List<Picture> pictures = new ArrayList<Picture>();
				pictures.add(picture);
				System.out.print("6");	
				com.setPicture(pictures);
				picture.setComment(com);
				System.out.print("7");	
				entityManager.persist(com);
				commitTransaction();
			}
		}
	}