I'm having problems with my 1:1 code. I've read the examples and since i'm
new at using castor jdo its posing some
problems for me. I hope someone can give me an insight to what it is I'm
doing wrong.
My database classes:
public class RoadLoansCJAffiliate
{
private int gcjAffiliateId = 0;
private int gApplicationId = 0;
..
private ApplicationDetail gAppDetail = null;
..
public ApplicationDetail getApplicationDetail()
{
return this.gAppDetail;
}
public void setApplicationDetail( ApplicationDetail value )
{
this.gAppDetail = value;
}
}
public class ApplicationDetail
{
private int gApplicationId;
private int gChkTradeIn;
private int gIsTaxPaidByCompany;
private int gHasLuxuryTax;
private int gIsPlus;
private int gIsSwitch;
private int gIsDealerPaid;
private int gHasOtherIncome;
private int gHasCoBuyerIncome;
private int gChkAccessories;
private int gIsMinus;
private int gUseFlatRateForParticipation;
private int gDealerVerifiedAdjustments;
private double gTotalAmtFinanced;
public void setApplicationId( int value )
{
this.gApplicationId = value;
}
public int getApplicationId()
{
return this.gApplicationId;
}
public void setChkTradeIn( int value )
{
this.gChkTradeIn = value;
}
public int getChkTradeIn()
{
return this.gChkTradeIn;
}
...
}
Here is my map file:
<class name="com.roadloans.db.daytona.RoadLoansCJAffiliate"
identity="cjAffiliateId">
<description>Commission Junction Affiliate
tables</description>
<map-to table="d_RoadLoans_CJ_Affiliate" />
<field name="cjAffiliateId" type="integer" >
<sql name="CJAffiliate_Id" type="integer"/>
</field>
<field name="applicationId" type="integer" >
<sql name="Application_Id" type="integer"/>
</field>
<field name="aid" type="integer" >
<sql name="Aid" type="integer"/>
</field>
<field name="pid" type="integer" >
<sql name="Pid" type="integer"/>
</field>
<field name="sid" type="string" >
<sql name="Sid" type="varchar"/>
</field>
<field name="dateCreated" type="date" >
<sql name="Date_Created" type="timestamp"/>
</field>
<field name="dateSent" type="date" >
<sql name="Date_Sent" type="timestamp"/>
</field>
<field name="applicationDetail"
type="com.roadloans.db.daytona.ApplicationDetail">
<sql name="Application_Id" />
</field>
</class>
<class name="com.roadloans.db.daytona.ApplicationDetail"
identity="applicationId">
<description>d_Application</description>
<map-to table="d_Application" />
<field name="applicationId" type="integer" >
<sql name="Application_Id" type="integer"/>
</field>
<field name="chkTradeIn" type="integer" >
<sql name="chk_TradeIn" type="integer"/>
</field>
<field name="isTaxPaidByCompany" type="integer" >
<sql name="Is_Tax_Paid_By_Company" type="bit"/>
</field>
<field name="hasLuxuryTax" type="integer" >
<sql name="Has_Luxury_Tax" type="bit"/>
</field>
<field name="isPlus" type="integer" >
<sql name="Is_Plus" type="bit"/>
</field>
<field name="isSwitch" type="integer" >
<sql name="Is_Switch" type="bit"/>
</field>
<field name="isDealerPaid" type="integer" >
<sql name="Is_Dealer_Paid" type="bit"/>
</field>
<field name="hasOtherIncome" type="integer" >
<sql name="Has_Other_Income" type="bit"/>
</field>
<field name="hasCoBuyerIncome" type="integer" >
<sql name="Has_CoBuyer_Income" type="bit"/>
</field>
<field name="chkAccessories" type="integer" >
<sql name="chk_Accessories" type="bit"/>
</field>
<field name="isMinus" type="integer" >
<sql name="Is_Minus" type="bit"/>
</field>
<field name="useFlatRateForParticipation" type="integer" >
<sql name="Use_Flat_Rate_For_Participation"
type="bit"/>
</field>
<field name="dealerVerifiedAdjustments" type="integer" >
<sql name="Dealer_Verified_Adjustments" type="bit"/>
</field>
<field name="totalAmtFinanced" type="double" >
<sql name="Total_Amt_Financed" type="double"/>
</field>
</class>
Now when i run the following code:
...
queryRoadLoansCJAffiliate = dbase.getOQLQuery( "SELECT a FROM
com.roadloans.db.daytona.RoadLoansCJAffiliate a WHERE
is_undefined(dateSent)" );
results = queryRoadLoansCJAffiliate.execute(true);
...
while( results.hasMore() == true ) causing the following error
below.
I get the following error:
org.exolab.castor.jdo.PersistenceException: Nested error:
java.sql.SQLException: [DRACO]Invalid column
name 'chk_TradeIn'.
java.sql.SQLException: [DRACO]Invalid column name 'chk_TradeIn'.
at com.inet.tds.a.a(Unknown Source)
at com.inet.tds.h.if(Unknown Source)
at com.inet.tds.h.a(Unknown Source)
at com.inet.tds.h.for(Unknown Source)
at com.inet.tds.c.new(Unknown Source)
at com.inet.tds.c.executeQuery(Unknown Source)
at org.exolab.castor.jdo.engine.SQLEngine.load(Unknown Source)
at org.exolab.castor.persist.ClassMolder.load(Unknown Source)
at org.exolab.castor.persist.LockEngine.load(Unknown Source)
at org.exolab.castor.persist.TransactionContext.load(Unknown Source)
at org.exolab.castor.persist.TransactionContext.load(Unknown Source)
at org.exolab.castor.persist.ClassMolder.load(Unknown Source)
at org.exolab.castor.persist.LockEngine.load(Unknown Source)
at org.exolab.castor.persist.TransactionContext.load(Unknown Source)
at org.exolab.castor.persist.QueryResults.fetch(Unknown Source)
at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(Unknown
Source)
at
org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(Unknown
Source)
at
com.roadloans.cmdtasks.apps.cjbatch.CJAffiliateBatch.processData(CJAffiliate
Batch.java:139)
at
com.roadloans.cmdtasks.apps.cjbatch.CJAffiliateBatch.main(CJAffiliateBatch.j
ava:449)
Table structure:
d_RoadLoans_CJ_Affiliate
CJAffiliate_ID int Primary key and an identity
Application_Id
d_Application_Detail
Applciation_Id int Primary Key
Excuse me if this may be an easy one to solve.
Thanks
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev