Is the articleId of a Journal Article same as the entryId we get from:
assetEntry.getEntryId();
?
If not how can i get articleId?
Thanks in advance.
I don't really get the problem here,
you can use JournalArticleLocalServiceUtil to get the JournalArticles by various get Methods. After this you can just use JournalArticle.getArticleId()
Related
I have the following problem, I have already done some research in the net and here, but no solution found so far, I would be glad to receive suggestions.
Consider the code:
myModel.create(array).then((justCreated)=>
{
//justCreated is the array of document just created, I can print them out and see!
})
My problem is: I just need their ids, on a array if possible. I could take one by one, but, is there a better way?
I have tried setting the second parameter to "_id" like we do with find or select like we do with populate, but no success. Any suggestion?
PS. I am using mongoose.
According to this post you can see that forEach is much slower than map method. So i think a better solution is the following
myModel.create(array)
.then(justCreated => {
const idsArray = justCreated.map(el => el._id);
})
.catch(err => console.log(err));
After giving some extra thoughts, I have come up with the solution, which I am afraid regarding performace, since my dataset is pretty big, that is the reason I cannot use subdocument, I have tried, but I exceed easily the 16MB maximum limit.
myModel.create(array).then((justCreated)=>
{
justCreated.ForEach((doc)=>{id.push(doc.id))
})
I am opened to suggestion for better ways to handle this problem but this seems to solve the problem, at least at first glance.
How can I use correlation ID in powershell to debug an issue in azure, Can anybody have any syntax that I Can use here.
According to your description, maybe you could use Get-AzureRmLog to get a log of events. Example: Get an event log by correlation ID
Get-AzureRmLog -CorrelationId "60c694d0-e46f-4c12-bed1-9b7aef541c23"
But, I suggest you could let us know what resource you want to debug, it better helps you to solve your problem.
I'm trying to search pages which location city equals to xyz.
For example find page Guiness in city = Wroclaw, it looks like this:
/search?q=Guiness&type=page&city=Wroclaw
But it doesn't work ?!
I tried many different ways.
I think the problem is in that the location is complex type, but I can't find in documentation how to search by complex type :(.
Hope help will came soon.
Thanks !
It's clearly documented what is possible with the /search endpoint:
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.5#search
You can't use other parameters than outlined there. Either this would be
/search?q=Guiness%20Wroclaw&type=page&fields=id,name,location
or search for a place with center coordinate and a distance:
/search?q=Guiness&type=place¢er=52.231804,21.007973&distance=5000
Is there a way to add FOR UPDATE to a find (SELECT) query in cakephp3?
I found this hack: http://bakery.cakephp.org/2012/04/14/SELECT-FOR-UPDATE-hack-kind-of-ugly-but-it-works-PostgreSQL-and-MySql.html but it does not work since the limit value must contain only of a number.
Another discussion on a similar topic can be found under https://github.com/cakephp/cakephp/issues/3136#event-213462937.
You can do it with Query::epilog()
$selectQuery->...->epilog('FOR UPDATE');
I opened a ticket for this for cakephp3 https://github.com/cakephp/cakephp/issues/6772#issuecomment-110530303.
The solution is to use the epilog method from the Query class:
$article->find('first')->epilog('FOR UPDATE');
Using Foursquare api "Venue" service.. i am parsing nearByVenue details like shop, restaurant etc.
Suppose as an example i am getting following link:
https://api.foursquare.com/v1/venues.json?geolat=40.562362&geolong=-111.938689
Issue is I am getting only 10 nearbyDetails.. suppose I am standing in New York there should be number of venue details.. why I am getting only 10 details only ?
Is there any other service or i am following wrong approach to use it?
Thanks
Add l=n where n is your limit in query string. The default limit is set to 30.
https://api.foursquare.com/v1/venues.json?geolat=40.562362&geolong=-111.938689&l=10
https://api.foursquare.com/v1/venues.xml?geolat=40.562362&geolong=-111.938689&l=50&q=coffee
You can change the value of l="no of result" parameter.
And also if you want to search for particular keyword like ATM, Coffee
then you can add the parameter q and add it's value like q="atm", q="coffee", etc.
hope it will be helpful to you.