Hmmm...

When I try to import the eoaccess package, I get this error at compile-time:

src/com/bestmaid/erp/client/Routing.java:10: package com.webobjects.eoaccess does not exist
import com.webobjects.eoaccess.*;

The JavaEOAccess.framework is part of the project and part of the Web Server target, as is the Routing.java file.

I don't understand why it sees the other packages (eocontrol, foudation) but not eoaccess.

Any ideas?

Dave


On May 18, 2006, at 6:25 PM, Ken Anderson wrote:

David,

Besides calling the set method in awakeFromInsertion(), I can't imagine what else there is to do. Of course, you need to get the EO in the correct editing context. Since the EC is passed into the awakeFromInsertion() method, you could:

public void awakeFromInsertion(EOEditingContext ec) {
MyObject obj = EOUtilities.objectMatchingKeyandValue(ec, "ENTITY", "KEY", "VALUE");
        setRelObj(obj);
}

I've never done Java client, but I would assume this will work...

Ken

On May 18, 2006, at 1:12 PM, David Avendasora wrote:

Hi all,

I know this has to be an incredibly simple thing to do, but I can't seem to figure out how.

All I want to do is defaults so that when an object is instantiated, it automatically has some of it's relationships defined. It is VERY easy to do this for an attribute, but I just can't get it to work for a relationship and I can't find in the documentation how to do it.

I know the code belongs in the awakeFromInsertion() method.

Can anyone give me a pointer to where in the documentation to look for this, or better yet a simple code fragment?

BTW, this is for a Java Client application, but I don't think that matters, right?

Dave


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/lists% 40anderhome.com

This email sent to [EMAIL PROTECTED]




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to