<commit_before>package org.openspaces.itest.persistency.hibernate.col1;

import com.gigaspaces.datasource.BulkDataPersister;
import com.gigaspaces.datasource.DataIterator;
import com.gigaspaces.datasource.SQLDataProvider;
import junit.framework.TestCase;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.openspaces.persistency.hibernate.DefaultHibernateExternalDataSource;
import org.springframework.orm.hibernate3.HibernateTemplate;

import java.util.Iterator;
import java.util.List;
import java.util.Properties;

/**
 * @author kimchy
 */
public class CollectionRelationshipTests extends TestCase {

    protected SessionFactory sessionFactory;

    protected BulkDataPersister bulkDataPersister;

    protected SQLDataProvider sqlDataProvider;

    protected HibernateTemplate hibernateTemplate;

    protected void setUp() throws Exception {
        Configuration conf = new Configuration().configure("org/openspaces/itest/persistency/hibernate/col1/hibernate.cfg.xml")
                .setProperty(Environment.HBM2DDL_AUTO, "create");
        sessionFactory = conf.buildSessionFactory();
        hibernateTemplate = new HibernateTemplate(sessionFactory);
        deleteContent();
        DefaultHibernateExternalDataSource dataSource = new DefaultHibernateExternalDataSource();
        dataSource.setInitialLoadChunkSize(-1);
        dataSource.setPerformOrderById(false);
        dataSource.setSessionFactory(sessionFactory);
        dataSource.init(new Properties());
        this.bulkDataPersister = dataSource;
        this.sqlDataProvider = dataSource;
    }
<commit_msg>added test for collection loading<commit_after>package org.openspaces.itest.persistency.hibernate.col1;

import com.gigaspaces.datasource.BulkDataPersister;
import com.gigaspaces.datasource.DataIterator;
import com.gigaspaces.datasource.SQLDataProvider;
import junit.framework.TestCase;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import org.openspaces.persistency.hibernate.DefaultHibernateExternalDataSource;
import org.springframework.orm.hibernate3.HibernateTemplate;

import java.util.Iterator;
import java.util.List;
import java.util.Properties;

/**
 * @author kimchy
 */
public class CollectionRelationshipTests extends TestCase {

    protected SessionFactory sessionFactory;

    protected BulkDataPersister bulkDataPersister;

    protected SQLDataProvider sqlDataProvider;

    protected HibernateTemplate hibernateTemplate;

    protected void setUp() throws Exception {
        Configuration conf = new Configuration().configure("org/openspaces/itest/persistency/hibernate/col1/hibernate.cfg.xml")
                .setProperty(Environment.HBM2DDL_AUTO, "create");
        sessionFactory = conf.buildSessionFactory();
        hibernateTemplate = new HibernateTemplate(sessionFactory);
        deleteContent();
        DefaultHibernateExternalDataSource dataSource = new DefaultHibernateExternalDataSource();
//        dataSource.setInitialLoadChunkSize(-1);
//        dataSource.setPerformOrderById(false);
        dataSource.setSessionFactory(sessionFactory);
        dataSource.init(new Properties());
        this.bulkDataPersister = dataSource;
        this.sqlDataProvider = dataSource;
    }

{'fraction_non_alphanumeric': 0.08246828143021914, 'fraction_numerical': 0.0028835063437139563, 'mean_word_length': 4.84991568296796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3408187', 'n_tokens_mistral': 959, 'n_tokens_neox': 882, 'n_words': 162}