What is the difference between findAllBy and readAllBy? - spring-data

I am trying to fix this issue Spring Data Neo4j 4 : findByPropertyIsNull is not working
Reading spring-data-docs
I want to be sure that the syntax findAllByPropertyIsNull is the right synatx
So What is the difference between findAllByProperty... and readAllByProperty... ?

Related

JPAQueryFactory NVL function

I am using this JPAQueryFactory .select to get the data
queryFactory.select(
Projections.bean(detailDTO.class,
qEmpcate.id,
qEmcate.date.as("completeDate"),
qEmpcate.status,
qCete_name
))
.from(qEmpcate)
.leftJoin(qCete).on(qCete.id.eq(qEmpcate.cete_id))
.fetch();
complete date is sometimes NULL and it causes error in other components. In SQL I would fix it simply by using something like NVL(qEmcate.date,'') but I am quite new to JPAQueryFactory (Spring boot in general) and I realized it wouldnt be that easy. JPAQueryFactory doesnt recognize NVL and COALESCE is not working for me. Is there any other function in JPAQueryFactory that replaces NULL values with some String ?
Thank you for help.

Julia MongoDB save raw variable

I would like to save some variables in Julia to a database using MongoDB. I ran into a problem when using the following function:
insert(client, "myDB.rawInfo", { "raw" => status})
This works when saving simple information, like strings or ints. However, status is of type Array{Any,1}. When saving, I get the following error message:
`build` has no method matching build(::Ptr{None}, ::Dict{String,Any})
while loading In[256], in expression starting on line 18
in append at C:\Users\Guido\.julia\v0.3\Mongo\src\BSON.jl:225
in append at C:\Users\Guido\.julia\v0.3\Mongo\src\BSON.jl:231 (repeats 2 times)
in build at C:\Users\Guido\.julia\v0.3\Mongo\src\BSON.jl:207
in BSONObject at C:\Users\Guido\.julia\v0.3\Mongo\src\BSON.jl:82
in find_one at C:\Users\Guido\.julia\v0.3\Mongo\src\Mongo.jl:30
in find_one at C:\Users\Guido\.julia\v0.3\Mongo\src\Mongo.jl:34
Can anyone help me?
There seems to be something wrong with the MongoDB package for Julia which causes the malfunction of nested variables. A fix has been made a while ago and can be applied by manually reinstalling this version of MongoDB for Julia (first uninstall, than manually reinstall): https://github.com/rened/Mongo.jl

Solr search error when dealing with Arabic string

I'm struggling with Solr search Arabic for several days and made some experiment. Here is the simple reflection of the problem.
After I store some Arabic sentence (now only 1 word السوري ) into database and have Solr index it, then query it by q=*:*&wt=python,(if no wt part, it was garbled chars) the response is:
'\u00d8\u00a7\u00d9\u201e\u00d8\u00b3\u00d9\u02c6\u00d8\u00b1\u00d9\u0160'
The actual word I store there for index is coding in another way:
'\xd8\xa7\xd9\x84\xd8\xb3\xd9\x88\xd8\xb1\xd9\x8a'
As you can tell, there is a one-to-to corresponding from \xd8↔\u00d8. But I don't know what is the name of this coding, thus I cannot convert it. And when I do the search as: <>/select/?q=السوري&wt=python,the response is:
{'responseHeader':{'status':0,'QTime':0,'params':{'wt':'python','q':u'\u0627\u0644\u0633\u0648\u0631\u064a'}},'response':{'numFound':0,'start':0,'docs':[]}}
No docs found and it seems using a third version for coding u'\u0627\u0644\u0633\u0648\u0631\u064a'. if I take it and encode('utf8') then it convert back to '\xd8\xa7\xd9\x84\xd8\xb3\xd9\x88\xd8\xb1\xd9\x8a'.
In summary, when it (السوري) is in my code (python) or in data base (mysql),
it presents as 'form1':
'\xd8\xa7\xd9\x84\xd8\xb3\xd9\x88\xd8\xb1\xd9\x8a'
When it is indexed by Solr, it converts to form2:
'\u00d8\u00a7\u00d9\u201e\u00d8\u00b3\u00d9\u02c6\u00d8\u00b1\u00d9\u0160'
And when I use <>/select/?q=السوري&wt=python, to query from browser (Google chrome), it becomes form3:
'\u0627\u0644\u0633\u0648\u0631\u064a'
(which could convert back to form1 by encode('utf8') But since they are different, the search matches nothing.
Therefore, those three different encode strategy may be the core problem. Could anyone help me figure it out and solve the search problem?
Thanks in advance.

wordcloud package: get "Error in strwidth(...) : invalid 'cex' value"

I am using the tm and wordcloud packages in R 2.15.1.
I am trying to make a word cloud from a DTM. Here is the code:
library(wordcloud)
thedtmsparse = inspect(sparse)
trymatrix = t(thedtmsparse)
colnames(trymatrix) = c()
comparison.cloud(trymatrix, max.words=15, random.order=FALSE)
I get the following error from the last command:
Error in strwidth(words[i], cex = size[i], ...) : invalid 'cex' value
I have used the same code on another DTM where it worked fine and I got the word cloud.
Can somebody tell me a fix for the error?
Ravi
You haven't provided reproducible code (probably a big reason no one answered your question), so I can only venture to guess what the problem might be.
I faced this same error, so I'll share my experience. The problem was I had NA's instead of 0's in my term document matrix. Simply fixing that fixed that problem.

Using F_RoundToEven FreeAdhocUDF function fails with some numbers

I have noticed that when we use F_RoundToEven UDF from FreeAdhocUDF, that it fails to produce a correct result with certain numbers.
For example, the query:
select
F_RoundToEven(21.145, 2) Correct,
F_RoundToEven(215.145, 2) Fail
from Rdb$Database
produces the result:
CORRECT FAIL
21.14 215.15
Obviously these two number should both resolve to .14
Has anyone else come across this problem, and perhaps found a way around it?
I am using the latest version of FreeAdhocUDF with Firebird 2.1 and it fails on both Windows 32bit and Linux 64bit.
Thanks.