• 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
Re: JavaEOGenerator running, but I do not understand the output.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JavaEOGenerator running, but I do not understand the output.


  • Subject: Re: JavaEOGenerator running, but I do not understand the output.
  • From: Johan Henselmans <email@hidden>
  • Date: Sun, 11 Nov 2007 14:26:44 +0100


Op 11 nov 2007, om 03:46 heeft Mike Schrag het volgende geschreven:

The trick was:

1- replace the -model argument with the full path, and add file: in front of it
eg: from [Example.eomodeld] to [file:/Users/johan/projects/example/ Resources/Example.eomodeld].
2- replace -destination path with the full path without the file: in front of it.
eg: from [Sources] to [/Users/johan/projects/example/Sources]
3- replace -subclassDestination with the full path without the file: in front of it.
eg: from [Sources] to [/Users/johan/projects/example/ Sources]
The next build of WOLips fixes this by supplying full paths instead of relative paths to the External EOGenerator.

_ProgramSetting.java
ProgramSetting.java
base/_ProgramSetting.java
.ProgramSetting.java
Do you not use packages for your EOs? Maybe that's where the . file ones came from? Obviously the _ProgramSetting.java is the old one, so that could be deleted. ProgramSetting.java is your file, so that's fine, base/_ProgramSetting.java is the new default base class. You can override the filename template to not include ".base." in the package name (and the default superclass template to remove base). It appears that the default templates will not actually build on 5.3, though, so you would need to change them.


I did not use packages. When I replaced the class name ProgramSetting in EOModeler with org.example.BL.ProgramSetting, a org.example.BL.base.ProgramSetting and a org.example.BL.ProgramSetting was created. So using JavaEOGenerator assumes that you are working in a packaging structure. After I made all the classes part of a package, everything was fine, apart from the fact that they were 5.4-ish, and I want 5.3. So I went to the second EOGenerator solution,


[snip]

And finally:

- Are these generated files also usable in a 5.3 environment?
Well, if you modify your templates to be 5.3 compliant, then yes, but the example templates are 5.4-only it looks like.



The other alternative is that you can use the Velocity-based EOGenerator (yes, Virginia, there are two eogenerator replacements). I have not mentioned this so far to just keep things less complicated, but we actually use this EOGenerator variant rather than JavaEOGenerator, so maybe others will find it to be useful also ... JavaEOGenerator is Apple's recommended way, Velocity EOGenerator is the "yeah, but you can do this too" way (aka the "my way"). If you modify your EOGenerator settings and remove your eogenerator executable path (leave it blank), it will switch to use the built-in Velocity eogenerator instead of an external one. There are example templates (that are actually my own templates) built-in, which you can download and modify/replace ( http://webobjects.mdimension.com/wolips/EOGenerator/Velocity EOGenerator Templates/ ). You'll need to modify your .eogen files to remove your eogen executable path and to point to the new templates. I personally prefer Velocity syntax for these over WO syntax ... It's a lot more compact, and I find it to be easier for this type of templating, but that's just me. One other (technical but possibly important) factoid is that the Velocity EOGenerator sits on top of Entity Modeler's EOModel stack whereas JavaEOGenerator sits on the WO 5.4 EOModel stack.


I tried that, but there are some strange things: if there is no class definition, eg it is just EOGenericRecord, it will create a class EOGenericRecord, and _EOGenericRecord, or com.webobjects.eocontrol.EOGenericRecord, depending on how the thing is defined in the EOModel.


Also, it seems that there are some strange things going on with n:m relations.

For instance, I have an n:m relation between product and review, so there is a connection table reviewproduct, with a class RevIewProduct.

Now I get an error in Product in this statement:

EOQualifier inverseQualifier = new EOKeyValueQualifier(nl.immix.ReviewProduct.PRODUCT_KEY, EOQualifier.QualifierOperatorEqual, this);

with the error:
	nl.immix.ReviewProduct.PRODUCT_KEY cannot be resolved	

which i scompletely logical as there is nno PRODUCT_KEY in the ReviewProduct class.

Anyway to work around these?



ms

_______________________________________________
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

Regards,

Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6273852


_______________________________________________ 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: JavaEOGenerator running, but I do not understand the output.
      • From: Mike Schrag <email@hidden>
References: 
 >JavaEOGenerator running, but I do not understand the output. (From: Johan Henselmans <email@hidden>)
 >Re: JavaEOGenerator running, but I do not understand the output. (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: JavaEOGenerator running, but I do not understand the output.
  • Next by Date: Re: JavaEOGenerator running, but I do not understand the output.
  • Previous by thread: Re: JavaEOGenerator running, but I do not understand the output.
  • Next by thread: Re: JavaEOGenerator running, but I do not understand the output.
  • Index(es):
    • Date
    • Thread