私は以下のスキーマを持っています: 
Customer 
id -Primary key 
customer_name 
phone .............                         
サービス
 ID - 主キー
customer_id -- Customer.id への外部キー
 .................  
Customer.hbm.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC 
"-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="thesis.database.Customer" table="customer">
    <meta attribute="class-description">
    </meta>
    <id name="customerId" type="int" column="customer_id">
        <generator class="native" />
    </id>
<property name="phone" column="phone" type="string" />
    <bag name="services" table="use_service" inverse="false" fetch="join" lazy="false"
        cascade="all">
        <key column="customer_id"  />
        <one-to-many class="thesis.database.Service" />
    </bag>
</class>
Service.hbm.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="thesis.database.Service" table="service">
    <meta attribute="class-description">
        This class contains the Service detail.
    </meta>
    <id name="id" type="int" column="id">
        <generator class="native" />
    </id>
    <many-to-one name="customer" class="thesis.database.Customer"
        fetch="select">
        <column name="customer_id" not-null="true" />
    </many-to-one>
    ....................
</class>
私の機能
 public static Customer getCustomerByPhoneNumber(String phoneNumber) {
    Session session = getSession();
    Criteria criteria = session.createCriteria(Customer.class);
    Criterion phone = Restrictions.eq("phone", phoneNumber);
    criteria.add(phone);
    Customer customer = (Customer) criteria.uniqueResult();
    session.close();
    return customer;
}
そしてその後、私は電話します
Customer customer =  getCustomerByPhoneNumber("123456789"); // customer with this phone is availuable in database
私はこの顧客を正常に取得しますが、リストサービスを取得するための getServices() 関数をセルに追加すると、サービステーブルにさらにレコードを追加しようとしますが、常に同じリストが取得されます。
例: 顧客テーブル
ID customer_name phone ........ 
1 Mr A 123456789..
およびサービス テーブル
ID customer_id 。 ................... 
1 1 .............................. 
2 1 ................... 
3 1 ................... .
最初のクエリ。リストのサイズ = 3 です。そのようなレコードをもう 1 つ挿入した後 4 1 ........... サービス テーブルに 2 番目のクエリ。私もリストサイズ= 3を取得しました。
誰もが理由を教えて、解決策を提案できますか? 少し早いですがお礼を!
私の解決策は、新しいレコードを追加した後にトランザクションを使用してコミットすることです。