Recap of v2.0 Beta 2 items found

Sep 1, 2010 at 2:16 PM
Edited Sep 1, 2010 at 2:18 PM

Hello,

The following is a list of the items I found working with the new Beta 2 version.  A couple of these were listed as part of an on-going discussion in other posts but thought I would consolidate everything here.

1) The generated class files have two references to "using System".  This causes a compile warning.

2) Seqeunces for the selected table are not being listed in the sequences picklist.  This was not an issue in Beta 1.

3) The tbale picklist is now being populated from the all_tables rather than the user_tables.  This creates a huge picklist to have to go through, especially since the list is not alpha sorted.  Propose the addition of a second user_tables picklist be added for ease of use.

4) For tables with a one-to-many relationship, this new version is handling the generated class file correctly.  For example, for a table that can contain 0....N entries of another table object, an IList is getting created:

public virtual IList<RptSource> RptSources { get; set; }

 The problem is that the hbm.xml mapping file does not have the needed reference to allow for the multiple IList objects to be saved.  The following mapping entry needs to exist for those items to be saved:

<bag table="RPT_SOURCE" name="RptSources" fetch="join" inverse="false" cascade="all">
      <key foreign-key="rpt_source_fk" column="group_id" />
      <one-to-many class="RptSource"/>
 </bag>

 

5) Some generated files are getting duplicate fields added.  Not sure why this happens for some but not all.  This has happened in database tables that have a primary key and one other field.  For example, the schema for a table will look like:

CREATE TABLE  "RPT_ASSET" 
   (	"ASSET_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ASSET_NAME" VARCHAR2(50) NOT NULL ENABLE, 
	 CONSTRAINT "RPT_ASSET_PK" PRIMARY KEY ("ASSET_ID") ENABLE, 
	 CONSTRAINT "RPT_ASSET_UK1" UNIQUE ("ASSET_ID", "ASSET_NAME") ENABLE
   )
and the resulting generated class file looks like:
public class RptAsset {
        public RptAsset() { }
        public virtual long AssetId { get; set; }
        public virtual long AssetId { get; set; }
        public virtual string AssetName { get; set; }
    }
the mapping file will also list it twice, once as an id and once as a property:
<class name="RptAsset" table="RPT_ASSET" lazy="true" >
    <id name="AssetId" column="ASSET_ID" />
    <property name="AssetId" column="ASSET_ID" />
    <property name="AssetName" column="ASSET_NAME" />
  </class>
 
Developer
Sep 1, 2010 at 9:45 PM

Thank you for that list. I've gone ahead and created a new bug for each one of your entries.