<commit_before><?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : AbstractCancerModel.hbm.xml
    Created on : May 4, 2005
    Author     : rajputs
    Description: Hibernate mapping file for AbstractCancerModel
-->

<!DOCTYPE hibernate-mapping PUBLIC 
	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="gov.nih.nci.camod.domain">
	<class name="AbstractCancerModel" 
    	table="abs_cancer_model"
        lazy="true">

	    <!-- id -->
	    <id name="id" 
	    	column="abs_cancer_model_id"
	    	type="long"    	
	    	unsaved-value="null">	    	
	        <generator class="native"/>
	    </id>	    
	    
	    <!-- discriminator -->
	    <discriminator column="abs_cancer_model_type"
	    	type="string"/>	       
	    
	    <!-- experimentDesign -->
        <property name="experimentDesign" 
        	column="experiment_design" 
        	type="text"/>	
        
        <!-- modelDescriptor -->
        <property name="modelDescriptor" 
        	column="model_descriptor" 
        	type="string"/>  
        	
        <!-- state -->
        <property name="state" 
        	column="state" 
        	type="string"/>  	      	
        	
        <!-- publicationCollection (one-to-many unidirectional) -->
        <bag name="publicationCollection" 
        	table="abs_can_mod_publication"
        	inverse="false" 
        	lazy="true" 
        	cascade="all-delete-orphan">
        	
        	<key column="abs_cancer_model_id"/>
        	<many-to-many column="publication_id"
            	unique="true"
            	class="Publication"/>
        </bag>        
        
        <!-- availability: this is really a one-to-one relationship with unique=true -->
        <!-- (one-to-one unidirectional) -->
        <many-to-one name="availability"
        	class="Availability"
        	column="availability_id"
        	cascade="all"
        	unique="true"/>
        	
        <!-- species (many-to-one unidirectional) -->
        <many-to-one
        	name="species"
        	column="taxon_id"
        	class="Taxon"/>
        	
		<!-- submitter (many-to-one unidirectional) -->
        <many-to-one
        	name="submitter"
        	column="submitter_id"
        	class="Person"/>
        	
        <!-- principalInvestigator (many-to-one unidirectional) -->
        <many-to-one
        	name="principalInvestigator"
        	column="principal_investigator_id"
        	class="Person"/>
	</class>
</hibernate-mapping><commit_msg>Change cascading behavior<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : AbstractCancerModel.hbm.xml
    Created on : May 4, 2005
    Author     : rajputs
    Description: Hibernate mapping file for AbstractCancerModel
-->

<!DOCTYPE hibernate-mapping PUBLIC 
	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="gov.nih.nci.camod.domain">
	<class name="AbstractCancerModel" 
    	table="abs_cancer_model"
        lazy="true">

	    <!-- id -->
	    <id name="id" 
	    	column="abs_cancer_model_id"
	    	type="long"    	
	    	unsaved-value="null">	    	
	        <generator class="native"/>
	    </id>	    
	    
	    <!-- discriminator -->
	    <discriminator column="abs_cancer_model_type"
	    	type="string"/>	       
	    
	    <!-- experimentDesign -->
        <property name="experimentDesign" 
        	column="experiment_design" 
        	type="text"/>	
        
        <!-- modelDescriptor -->
        <property name="modelDescriptor" 
        	column="model_descriptor" 
        	type="string"/>  
        	
        <!-- state -->
        <property name="state" 
        	column="state" 
        	type="string"/>  	      	
        	
        <!-- publicationCollection (one-to-many unidirectional) -->
        <bag name="publicationCollection" 
        	table="abs_can_mod_publication"
        	inverse="false" 
        	lazy="true" 
        	cascade="all-delete-orphan">
        	
        	<key column="abs_cancer_model_id"/>
        	<many-to-many column="publication_id"
            	unique="true"
            	class="Publication"/>
        </bag>        
        
        <!-- availability: this is really a one-to-one relationship with unique=true -->
        <!-- (one-to-one unidirectional) -->
        <many-to-one name="availability"
        	class="Availability"
        	column="availability_id"
        	cascade="all"
        	unique="true"/>
        	
        <!-- species (many-to-one unidirectional) -->
        <many-to-one
        	name="species"
        	column="taxon_id"
        	cascade="all"
        	class="Taxon"/>
        	
		<!-- submitter (many-to-one unidirectional) -->
        <many-to-one
        	name="submitter"
        	column="submitter_id"
        	cascade="save-update"
        	class="Person"/>
        	
        <!-- principalInvestigator (many-to-one unidirectional) -->
        <many-to-one
        	name="principalInvestigator"
        	column="principal_investigator_id"
        	cascade="save-update"
        	class="Person"/>
	</class>
</hibernate-mapping>
{'fraction_non_alphanumeric': 0.14008913001356327, 'fraction_numerical': 0.004650261577213718, 'mean_word_length': 1.840946615299945, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 2, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '4889445', 'n_tokens_mistral': 1666, 'n_tokens_neox': 1526, 'n_words': 236}