For instance, Supplier.findByName('Röde Orm') returns null even though this name exists in the field "SearchName" in table "Supplier".
Is this correct or do I have to do some reconfiguration of grails?
Well, now the problem disappeared. I don't know why I got the problem in the beginning but I know that the URLEncoder.encode was completely wrong to use here but I never thought about that and after doing some corrections in the database, still using varchar, things started to work but not until I removed the URLEncoder call.
Related
I am trying to identify whether within my react final form I have a duplicated name field and then throw an error. I have tried to use a decorator on registerField() and it seems to work fine, however, on a re-render this will not work. I have also tried to use getRegisterFields() but it seems like its either removing duplicate names or it never registers 2 fields with the same name.
What would you think would be a perfect approach here? Much appreciated.
I'm trying to integrate my Oracle Database into my ASP.NET app, but I keep getting this error :
Error 2002: The EntityContainer 'OracleDBTargetContainer' for the
storage model specified as part of this MSL does not exist in
MetadataWorkspace.
I've tried everything I could think of but still can't figure out what's wrong.
What can I do to diagnose the root cause of this?
This is still new to me so I might miss something very obvious.
I'm assuming it my not like my database as the Diagram displayed when I integrated another DB. I've checked the foreign keys, primary keys, ... but to no good.
Using VS2013 with ODP.NET 12c Release 3.
EDIT : My EntityContainerMapping is empty, is that normal?
<EntityContainerMapping CdmEntityContainer="PMModelContainer" StorageEntityContainer="PMModelTargetContainer"></EntityContainerMapping>
I found what was wrong.
One of my foreign key didn't match the primary key (Number 20 instead of Number 10)
I saw on stack overflow that it could be a problem and checked my tables but I missed that one obviously.
How did I realize it ? Well because rather than creating the EF Designer, I chose the Code First from database option, and, oh, what do you know, the error message now tells you EXACTLY what the problem is ! (Table names and columns).
Is the parameter spelled "adress" or "address"?
Here's the API doc: http://developer.eventbrite.com/doc/venues/venue_new/
Where it says:
address The venue adress (line 1).
I ask this question because I'm porting some code, and it looks like we have been using "adress" and from looking at various github repos, it looks like this is considered one of the "inconsistant" variable naming issues related to this API.
I know the misspelled parameter is working.
I want to use the API correctly if I can, and would like to use "address" and just want confirmation that the it will indeed work, and that "adress" only works to be backwards compatible.
Thanks in advance!
Great question!
I fixed the 'adress' spelling typo, but the older spelling of this input label is still allowed (in order to ensure backwords compatibility with existing apps).
We don't have any plans to drop support for the older, misspelled attribute name - but, if you are revisiting old code, it won't hurt to fix the typo on your end as well.
The change should help ensure that the venue object's schema / attribute names remain consistent on input and output.
Seems my appreciation for the Entity Framework is taking a serious hit. The "MS almost got it right, but they just missed it because of something L-A-M-E" thought is coming up. Until today everything has been fine. For some unknown reason, it won't compile anymore with Error 2048. I've read up on this and I've seen how you need to map all three operations. Why is this even necessary? What I if I don't need a delete function and only need insert and update? I tried mapping a dummy SP to my delete function. If that fixes my problem, however cheezy, fine. Only problem is, it just created more problems.
Here's what I have. I'm writing a simple newsletter app in MVC. I have entities for a publication, issue and article all generated from my DB (SQL 08). I set up the the relationships in my DB and they translated fine to my EDMX. I made some SPs to insert and update my issues and article. I added them to the EDMX and mapped them accordingly. I don't need a delete function for any of them and I don't need anything for the publication entity. Why is the compiler forcing me to map all functions? IMO, this a MAJOR, MAJOR PROBLEM with EF4 and I can't believe MS would release it with this kind of crap coming up.
The other strange issue is I've tried mapping sp's to entities in another project and configured with only insert and update and they compile fine. Why is the compiler inconsistent?
I would rather not resort to having to use the Imported Functions. Is that my only option? If that's the case it eliminates the ability to the SaveChanges method. Come On MS!!! Fix this!!!!!!!
After much digging and side by side text comparison, I think I have found the solution.
The SP in question was set up like
CREATE PROCEDURE updateArticle
(
#ArticleID INT,
#Content TEXT
)
where it should have been something like
CREATE PROCEDURE updateArticle
(
#ArticleID INT,
#IssueID INT,
#Content TEXT
)
Now, I still don't know why EF4 even requires this since I'm not updating the issueid and the error message lends little help in diagnosing the problem. My SP doesn't even use the IssueID, but EF needs it regardless. Hopefully this will help someone down the road. MS still could do a better job regarding the need for this.
Question using Grails 1.3.4 - the 'scale' constraint does not seem to keep my decimals.
I have a field defined as: Float latitude
I have a constraint: latitude(blank: false, range:-360.0f..360.0f, scale:6)
The Oracle 10g field is defined as: NUMBER(10,6)
When I enter a value in Create or Edit, the correct value gets to the database. However, it never displays correctly in Show. If I enter 10.1234567 and update, 10.123457 is in the database but 10.123 displays in Show.
If I Edit, the value shows as 10.123, and if I update without modifying it, 10.123 will be stored in the database, replacing 10.123457 even though I never touched that field.
If I edit the value to 10.456789, but leave another required field blank, the resulting Edit screen with the error message displays the value as 10.457.
Why is Grails continually rounding the value to 3 digits? I tried the field as a Double as well, but same results. I thought maybe it was Oracle, but I tried it with the default dev database, and same result. I thought maybe it was the 'range', but I took that off with the same result.
Hmm - are you sure it's displaying correctly in your database viewer? Also - check your use of tags: See http://www.pubbs.net/200908/grails/38057-grails-user-how-does-rounding-of-decimals-work-in-gsp.html
Wasted too much time trying to figure this out, ended up using the solution suggested by snowmanjack.
The default data binding that occurs with the fieldValue call is truncating it. You can write a new data binder that handles conversion the way you want as described here http://grails.org/doc/latest/guide/single.html#dataBinding
Or you can do the lazy, probably less safe method that I used and access the property directly.
I replaced.
${fieldValue(bean: countryInstance, field: "latitude")}
with
${contryInstance.latitude}