• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
expected a ___ but received a com.webobjects.eocontrol.EOGenericRecord
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

expected a ___ but received a com.webobjects.eocontrol.EOGenericRecord


  • Subject: expected a ___ but received a com.webobjects.eocontrol.EOGenericRecord
  • From: Thomas Worrall <email@hidden>
  • Date: Sat, 18 Oct 2008 21:32:06 +0100

Hi! You must all be getting mighty sick of me by now :(

This used to work, but something changed. I think I have upgraded Wonder in the meantime, so it may be an upgrade problem.

In my Main component, I have this line:

<wo:WORepetition list="$companies" item="$companyEnumerator">One Company</wo:WORepetition>

Associated Java code:

public class Main extends ERXComponent {
public Company companyEnumerator;

public Main(WOContext context) {
super(context);
}

public NSArray<Company> companies() {
return EOUtilities.objectsForEntityNamed(session().defaultEditingContext(), "Company");
}
}

The entity Company has a class name Company, and I generated the Java files for it using Velocity, using the _WonderEntity.java templates.

The error I get is this:

Error:java.lang.IllegalArgumentException: While trying to set the field "companyEnumerator" on an object of type com.operawarwick.venice.components.Main we expected a com.operawarwick.venice.Company but received a com.webobjects.eocontrol.EOGenericRecord with a value of {values = {shows = ")>"; name = "Name of company"; agents = ")>"; }; this = ""; }. This often happens if you forget to use a formatter.
Reason:While trying to set the field "companyEnumerator" on an object of type com.operawarwick.venice.components.Main we expected a com.operawarwick.venice.Company but received a com.webobjects.eocontrol.EOGenericRecord with a value of {values = {shows = "<com.webobjects.eocontrol._EOCheapCopyMutableArray 37d115 (<EOAccessArrayFaultHandler shows _EOIntegralKeyGlobalID[Company (java.lang.Integer)1]>)>"; name = "Name of company"; agents = "<com.webobjects.eocontrol._EOCheapCopyMutableArray c52ffa (<EOAccessArrayFaultHandler agents _EOIntegralKeyGlobalID[Company (java.lang.Integer)1]>)>"; }; this = "<com.webobjects.eocontrol.EOGenericRecord ad6c35 _EOIntegralKeyGlobalID[Company (java.lang.Integer)1]>"; }. This often happens if you forget to use a formatter.

As I say, it used to work. I did some stuff to the rest of the app, and then came back to this part, and it no longer worked. I've just created a new project and put in just this code, and it still does it. It could be something to do with my EOModel file (attached), but I don't see what -- it has the correct class name listed. It's as if the EOUtilities method is returning everything as type EOGenericRecord despite what is written in the EOModel.

Thomas

Attachment: venice.eomodeld.zip
Description: Zip archive

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: expected a ___ but received a com.webobjects.eocontrol.EOGenericRecord
      • From: Chuck Hill <email@hidden>
  • Prev by Date: removing me form the list??
  • Next by Date: Re: EOObjectNotAvailableException: prepareForSaveWithCoordinator
  • Previous by thread: removing me form the list??
  • Next by thread: Re: expected a ___ but received a com.webobjects.eocontrol.EOGenericRecord
  • Index(es):
    • Date
    • Thread