Re: help with eogenerator
Re: help with eogenerator
- Subject: Re: help with eogenerator
- From: Theodore Petrosky <email@hidden>
- Date: Mon, 28 Jan 2008 06:09:59 -0800 (PST)
It does indeed appear to be a problem with the
initial cap.... This wasn't a problem before. I am
using postgresql as my backend and it will fold name
(table and column) to lower case if they are not
quoted.
Which leads me to think I should just use the Initial
cap in the table name and not worry about it. (It will
fold to lowercase when the table is created and during
a query) Until one day when someone fixes this and the
table names are quoted in a query and then I am hosed.
Ted
--- "Simon J. Oliver" <email@hidden> wrote:
> Ted -
>
> I've wrestled with this a couple of times, and
> although I don't have
> the code in front of me right now, I think it boiled
> down to the fact
> that the template uses different ways to arrive at
> the method names
> used in the first and second methods, and in
> particular that these
> behave differently with regard to case sensitivity -
> resulting in
> 'fetchRequiredNewEntity' and
> 'fetchRequirednewentity' respectively.
>
> I think this can be worked around by making sure
> that your class names
> (and entity names?) match in terms of
> capitalization, and maybe also
> that the relationship name matches as well.
>
> Specifically, it looks like your newentity is not
> initial caps, and I
> think initial caps may be required per the
> assumptions that the
> standard template uses. Given that, it seems that
> the 'wrong' version
> of the method name and call to the overloaded method
> is in the first
> of the two methods - the one that has 'NewEntity'
> with initial caps.
> Therefore, you may want to look at the templates you
> are using, and
> make the code used to arrive at the first method
> name (and the call to
> the second one) look more like the way the second
> one is generated.
>
> Sorry if this is a bit vague. It's early, I'm low on
> coffee for the
> day, and I don't have any code in front of me (which
> is why I'm not
> posting this back to the list :-) ). But I know I
> banged my head
> against the wall long enough with this that I at
> least wanted to offer
> some pointers.
>
> Regards,
>
> Simon
>
>
>
>
>
>
> On Jan 28, 2008, at 12:01 AM, Theodore Petrosky
> wrote:
>
> > I did have things working...... I don't know what
> I
> > updated (maybe the project wonder frameworks???)
> but
> > now when I eogenerate I get errors...
> >
> >
> > public static newentity
> > fetchRequiredNewEntity(EOEditingContext
> > editingContext, String keyName, Object value) {
> > return
> > _newentity.fetchRequiredNewEntity(editingContext,
> new
> > EOKeyValueQualifier(keyName,
> > EOQualifier.QualifierOperatorEqual, value));
> > }
> >
> > public static newentity
> > fetchRequirednewentity(EOEditingContext
> > editingContext, EOQualifier qualifier) {
> > newentity eoObject =
> > _newentity.fetchnewentity(editingContext,
> qualifier);
> > if (eoObject == null) {
> > throw new NoSuchElementException("There was
> no
> > NewEntity that matched the qualifier '" +
> qualifier +
> > "'.");
> > }
> > return eoObject;
> > }
> >
> > I have red x's for the fetchnewentity and
> > fetchRequiredNewEntity. I did not have these last
> > week. I wish I understood what was happening here
> > better... this is frustrating.
> >
> > can someone shed light here. I am using postgresql
> as
> > my backend...
> >
> > Ted
> >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Looking for last minute shopping deals?
> > Find them fast with Yahoo! Search.
>
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> > _______________________________________________
> > 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
>
>
>
> --
> Simon J. Oliver
> Applied Information Technology Center/SBBER
> University of Memphis, TN
>
>
>
>
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
_______________________________________________
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