• 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
ERXMutableArray fields in Entity Modeler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERXMutableArray fields in Entity Modeler


  • Subject: ERXMutableArray fields in Entity Modeler
  • From: Jeff Schmitz <email@hidden>
  • Date: Thu, 17 Apr 2008 06:20:04 -0500

Hello,

 I've taken Dave's SooperSeekrit Screencast project as a starting point to start playing with EO objects using the Wonder Framework.  

    Using Entity Modeler (with Frontbase prototypes), I've added an ERXMutableArray to one of my classes that I want to use as an array of Boolean's in my code.  In this case, what do I need to put as the Value Type?  Also, for the width, will it be 4 bytes X the max number of Booleans to be stored?

 

I have tried just leaving these fields blank.

Then using the following code, I'm able to create a User object ok, and it shows up in my database with the Boolean array as a Blob:

     Group group = Group.fetchRequiredGroup(ec, "name", "user");
     Boolean [] bools = {true, false, true};
     ERXMutableArray boolArray = new ERXMutableArray(bools);
     User.createUser(ec, boolArray, first, last, password, newuser, group);
     ec.saveChanges();

However, when I try to a fetch from the DirectAction class as follows:

EOQualifier qual = User.USERNAME.eq(username).and(User.PASSWORD.eq(password));
User user = User.fetchRequiredUser(ERXEC.newEditingContext(), qual);


I get the following exception on the User.fetchRequiredUser line:

Apr 16 22:31:32 SooperSeekrit[49595] (ERXDatabaseContextDelegate.java:105) INFO  er.transaction.adaptor.Exceptions  - Database Exception occured: java.lang.ClassCastException: er.extensions.ERXMutableArray

I'm guessing it has to do with the missing fields?

Thanks,
Jeff
 _______________________________________________
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: ERXMutableArray fields in Entity Modeler
      • From: "Denis Frolov" <email@hidden>
  • Prev by Date: Re: Upgraded to Leopard - what do I need to do?
  • Next by Date: "First request in session" problem and a bug in WOComponentRequestHandler
  • Previous by thread: i need help with D2W Templates
  • Next by thread: Re: ERXMutableArray fields in Entity Modeler
  • Index(es):
    • Date
    • Thread