Re: Prototypes and Inheritance
Re: Prototypes and Inheritance
- Subject: Re: Prototypes and Inheritance
- From: Dev WO <email@hidden>
- Date: Fri, 26 Aug 2005 01:16:15 +0200
I may be wrong, but does prototypes work when inherited?
I'm actually trying prototypes on a project (I shouldn't read
Chuck's book when it's time to sleep;)),
That all depends on whether you want to stay awake or not. ;-)
I really appreciated your course at WWDC, and I'd really want to
learn more (as I know pretty much nothing). So I'd say I want to stay
awake:)
and I'm having problem with a java.null.pointer exception with an
entity difined from a parent entity with prototypes.
Probably the model is missing something or the connection
dictionaries are different.
I started from the same project/eomodel, and just created my
prototypes framework, importing it in the previous application
framework.
Regarding the connection, I think it's ok as I have setup some fetch
to be done at session creation and I can see it's working in the log
using
EOAdaptorDebugEnabled=YES
I may be wrong and will recheck that, but I don't think the model is
missing anything
I'll investigate more, but I just wanted to know if it should work
or if there specific "take care of"?
It should work. What is the stack trace from the null pointer?
The application starts with a loggin panel, I enter an email and a
password which are in the database (from when the application was
working) and got:
----
[2005-08-26 01:02:55 CEST] <WorkerThread1>
java.lang.NullPointerException
at
com.webobjects.eoaccess.EOAttribute.adaptorValueByConvertingAttributeVal
ue(EOAttribute.java:2020)
at com.webobjects.jdbcadaptor.JDBCColumn.takeInputValue
(JDBCColumn.java:562)
at
com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindingsAn
dExecute(JDBCChannel.java:226)
at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression
(JDBCChannel.java:303)
at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression
(JDBCChannel.java:261)
at com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes
(JDBCChannel.java:185)
at
com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationE
ditingContext(EODatabaseChannel.java:878)
at
com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecific
ation(EODatabaseChannel.java:215)
at
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecification
EditingContext(EODatabaseContext.java:3205)
at
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(
EODatabaseContext.java:3346)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecif
ication(EOObjectStoreCoordinator.java:539)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(
EOEditingContext.java:4111)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(
EOEditingContext.java:4497)
at Session.validateMember(Session.java:105)
----
then the sql evaluation a couple lines below
----
[2005-08-26 01:02:55 CEST] <WorkerThread1> === Begin Internal
Transaction
[2005-08-26 01:02:55 CEST] <WorkerThread1> evaluateExpression:
<com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "SELECT
t0.C_MEMBER_ADMIN_RIGHTS, t0.C_MEMBER_MANAGING_ITEMS_RIGHTS,
t0.C_MEMBER_MANAGING_LINKS_RIGHTS, t0.C_MEMBER_MANAGING_TEXT_RIGHTS,
t0.C_PERSON_ACTIVATION, t0.C_PERSON_EMAIL, t0.C_PERSON_FIRST_NAME,
t0.C_PERSON_PERSON_ID, t0.C_PERSON_LAST_NAME, t0.C_PERSON_PASSWORD,
t0.C_PERSON_REGISTRATION_DATE FROM MEMBER t0 WHERE t0.C_PERSON_EMAIL
= ?" withBindings: 1:"email@hidden"(personEmail)>
----
and finally the line which lead to the crash in my application:
----
if (password == null || password == "") return false;
if (email == null || email == "") return false;
NSMutableArray args = new NSMutableArray();
args.addObject(email);
EOQualifier qual = EOQualifier.qualifierWithQualifierFormat
("personEmail = %@", args);
EOFetchSpecification spec = new EOFetchSpecification
("Member",qual,null);
NSArray results = ec.objectsWithFetchSpecification(spec); //
THIS is the line
----
So it looks like it doesn't find any entry in the database for this
email?!
How are your models set up (in xCode, installed, in the same
project, in different ones?)
The models and frameworks are all in the /Library/Frameworks/ folder
and referenced using absolute path (easier to move to production).
Xavier
_______________________________________________
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