A few other problems with the "base" generated code (the classes with
the _ before their names):
1. The code references some classes that the compiler can't find. I'm
using WO 5.3 btw. e.g.
com.webobjects.eoaccess.EORelationship.DeleteRuleNullify:
2.The below generated code references an operation that doesn't exist,
namely addToEntriesRelationship.
public void initializeEntries(com.netBrackets.core.EOEntries
value) {
this.addToEntriesRelationship(value);
}
3. "&&"s come out as &&, e.g.
if ((this.editingContext() != null) && (object !=
null) && (!this.isReadOnly()) && (!
object.isReadOnly()) && (!
this.editingContext().equals(object.editingContext()))) {
4. Two functions with the same name and signature are generated.
Operations are shown below:
public void addToEntries(com.netBrackets.core.EOEntries object) {
this.includeObjectIntoPropertyWithKey(object, "entries");
}
public void addToEntries(com.netBrackets.core.EOEntries object) {
if (logger.isDebugEnabled()) {
if ((this.editingContext() != null) && (object != null)
&& (!this.isReadOnly()) && (!object.isReadOnly())
&& (!this.editingContext().equals(object.editingContext()))) {
try {
throw new Exception("WrongEdidtingContext");
} catch(Exception exception) {
logger.warn("addToEntries exception " , exception);
}
}
}
this.includeObjectIntoPropertyWithKey(object, "entries");
}
On Dec 22, 2007, at 10:12 PM, Jeff Schmitz wrote:
I have tried JavaEOGenerator and came across a couple of
idiosyncrasies (or maybe user error?):
1. I was able to create the eogen file in my project. But then when
I right click->EOgenerate... it, it looks for my eomodel file in the
JavaEOGenerator project, not my project. I copied my eomodel file
to the EOGenerate project, and it worked.
2. I have a couple of queries with spaces in their names. The
generated code creates function names with spaces in them, so they
don't compile.
e.g.
public static NSArray objectsForGet Last Year
Entries(com.webobjects.eocontrol.EOEditingContext context,
java.lang.String poolNameBinding, java.lang.Integer poolTypeBinding) {
Do I need to take out the spaces, or is this a bug in
JavaEOGenerator? They always worked ok before with the spaces.
Also, is there a way to make it look for my eomodel file in my own
project (where the eogen file resides)?
Thanks,
Jeff
On Dec 22, 2007, at 9:53 AM, Guido Neitzer wrote:
On 22.12.2007, at 08:47, Drew Thoeni wrote:
Using the same instructions as Jeff, with the default install of
Leopard (WO 5.4) and the latest version of Eclipse (3.3.1.1.),
WOLips (3.3.4750, updated last night) and EOGenerator (1.7).
EOGenerator doesn't work on Leopard out of the box. If you really
need it for the time being until you made the switch to Velocity or
JavaEOGenerator, you can follow the instructions here:
http://tinyurl.com/22woqf
My advise on that is: if you have to run EOGenerator today or
tomorrow, apply the stuff above - and only if you really have to!
If you need it next week - give Velocity or JavaEOGenerator a try.
cug
--
http://www.event-s.net
_______________________________________________
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/jeffandmonica%40mac.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/jeffandmonica%40mac.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 [EMAIL PROTECTED]