getRelatedOne question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

getRelatedOne question

Bilgin Ibryam
Hi, I am facing a problem and even spent some hours could not solve it. May be some of you can help me :)

I look at OrderReadHelper.java line 1610 (getCurrentOrderItemWorkEffort method)

workOrderItemFulFillment = orderItem.getRelatedOne("WorkOrderItemFulFillment");

orderItem.getRelatedOne("WorkOrderItemFulFillment")  always  return null even it "should return" a line from WorkOrderItemFulFillment entity.  
here is the error message:

Could not find relation for relationName: WorkOrderItemFulFillment for value [GenericEntity:OrderItem][autoCancelDate,null()][budgetId,null()][budgetItemSeqId,null()][cancelQuantity,null()][comments,null()][correspondingPoId,(java.lang.String)][createdStamp,2007-07-26 18:37:19.91(java.sql.Timestamp)][createdTxStamp,2007-07-26 18:37:19.228(java.sql.Timestamp)][deploymentId,null()][dontCancelSetDate,null()][dontCancelSetUserLogin,null()][estimatedDeliveryDate,null()][estimatedShipDate,null()][externalId,null()][fromInventoryItemId,null()][isItemGroupPrimary,null()][isModifiedPrice,N(java.lang.String)][isPromo,N(java.lang.String)][itemDescription,Luxury Room(java.lang.String)][lastUpdatedStamp,2007-07-26 18:37:21.987(java.sql.Timestamp)][lastUpdatedTxStamp,2007-07-26 18:37:21.955(java.sql.Timestamp)][orderId,WSCO10050(java.lang.String)][orderItemGroupSeqId,null()][orderItemSeqId,00001(java.lang.String)][orderItemTypeId,RENTAL_ORDER_ITEM(java.lang.String)][overrideGlAccountId,null()][prodCatalogId,RentalCatalog(java.lang.String)][productCategoryId,null()][productFeatureId,null()][productId,RoomLux(java.lang.String)][quantity,1.0(java.lang.Double)][quoteId,null()][quoteItemSeqId,null()][recurringFreqUomId,null()][selectedAmount,0.0(java.lang.Double)][shipAfterDate,null()][shipBeforeDate,null()][shoppingListId,null()][shoppingListItemSeqId,null()][statusId,ITEM_APPROVED(java.lang.String)][subscriptionId,null()][syncStatusId,null()][unitAverageCost,null()][unitListPrice,25.99(java.lang.Double)][unitPrice,25.99(java.lang.Double)][unitRecurringPrice,null()]

In the WorkOrderItemFulFillment entity there is line with "orderId = WSCO10050" and "orderItemSeqId = 00001 " but i get null.

Any help would be greatly appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: getRelatedOne question

Krzysztof Podejma
I think it happens because there is no WorkOrderItemFulFillment relation for
OrderItem entity(in entitymodel.xml). So this method has a bug. You can find
this record with findByCondition and orderItemId field of OrderItem in
WorkOrderItemFulFillment entity.

Krzysztof Podejma

2007/7/26, Bilgin <[hidden email]>:

>
>
> Hi, I am facing a problem and even spent some hours could not solve it.
> May
> be some of you can help me :)
>
> I look at OrderReadHelper.java line 1610 (getCurrentOrderItemWorkEffort
> method)
>
> workOrderItemFulFillment =
> orderItem.getRelatedOne("WorkOrderItemFulFillment");
>
> orderItem.getRelatedOne("WorkOrderItemFulFillment")  always  return null
> even it "should return" a line from WorkOrderItemFulFillment entity.
> here is the error message:
>
> Could not find relation for relationName: WorkOrderItemFulFillment for
> value
>
> [GenericEntity:OrderItem][autoCancelDate,null()][budgetId,null()][budgetItemSeqId,null()][cancelQuantity,null()][comments,null()][correspondingPoId,(
> java.lang.String)][createdStamp,2007-07-26
> 18:37:19.91(java.sql.Timestamp)][createdTxStamp,2007-07-26
> 18:37:19.228(java.sql.Timestamp
> )][deploymentId,null()][dontCancelSetDate,null()][dontCancelSetUserLogin,null()][estimatedDeliveryDate,null()][estimatedShipDate,null()][externalId,null()][fromInventoryItemId,null()][isItemGroupPrimary,null()][isModifiedPrice,N(
> java.lang.String)][isPromo,N(java.lang.String)][itemDescription,Luxury
> Room(java.lang.String)][lastUpdatedStamp,2007-07-26
> 18:37:21.987(java.sql.Timestamp)][lastUpdatedTxStamp,2007-07-26
> 18:37:21.955(java.sql.Timestamp)][orderId,WSCO10050(java.lang.String
> )][orderItemGroupSeqId,null()][orderItemSeqId,00001(java.lang.String
> )][orderItemTypeId,RENTAL_ORDER_ITEM(java.lang.String
> )][overrideGlAccountId,null()][prodCatalogId,RentalCatalog(
> java.lang.String
> )][productCategoryId,null()][productFeatureId,null()][productId,RoomLux(
> java.lang.String)][quantity,1.0(java.lang.Double
> )][quoteId,null()][quoteItemSeqId,null()][recurringFreqUomId,null()][selectedAmount,
> 0.0(java.lang.Double
> )][shipAfterDate,null()][shipBeforeDate,null()][shoppingListId,null()][shoppingListItemSeqId,null()][statusId,ITEM_APPROVED(
> java.lang.String
> )][subscriptionId,null()][syncStatusId,null()][unitAverageCost,null()][unitListPrice,
> 25.99(java.lang.Double)][unitPrice,25.99(java.lang.Double
> )][unitRecurringPrice,null()]
>
> In the WorkOrderItemFulFillment entity there is line with "orderId =
> WSCO10050" and "orderItemSeqId = 00001 " but i get null.
>
> Any help would be greatly appreciated.
> --
> View this message in context:
> http://www.nabble.com/getRelatedOne-question-tf4152862.html#a11814582
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: getRelatedOne question

Bilgin Ibryam
Yes, you are right. There is relation from WorkOrderItemFulFillment to OrderItem but not from OrderItem .
Thnaks for fast answer Krzysztof.