Forums

Home » Mobile » Liferay Mobile SDK

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Nha Duong
Get my articles
May 30, 2014 2:31 AM
Answer

Nha Duong

Rank: New Member

Posts: 24

Join Date: February 20, 2014

Recent Posts

I want get my article . I use method follow
1   NSDictionary *serviceContext=@{@"addGroupPermissions": @(YES),@"addGuestPermissions":@(YES),@"scopeGroupId":@(140401)};
2 LRJournalArticleService_v62 * sv=[[LRJournalArticleService_v62 alloc]initWithSession:session];
3 NSString *className =@"com.liferay.portlet.bookmarks.util.comparator.EntryNameComparator";
4  LRJSONObjectWrapper *orderByComparatorDesc = [[LRJSONObjectWrapper alloc]
5                                                      initWithClassName:className jsonObject:[NSDictionary dictionary]];
6        NSError *errorr;
7        NSArray *articles= [sv getGroupArticlesWithGroupId:140401 userId:104427 rootFolderId:0 start:-1 end:-1 orderByComparator:orderByComparatorDesc error:&errorr];

occur error
1Error Domain=com.liferay.mobile Code=-1 "com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query" UserInfo=0x9b26bf0 {NSLocalizedDescription=com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query}

this error is issues of liferay system or my server? Help!
Bruno Farache
RE: Get my articles
May 30, 2014 4:28 AM
Answer

Bruno Farache

LIFERAY STAFF

Rank: Liferay Master

Posts: 587

Join Date: May 14, 2007

Recent Posts

Nha, you are using a comparator that can only be used with the bookmarks portlet.

You can see a list of comparators that can be used for journal articles here.
Nha Duong
RE: Get my articles
May 30, 2014 9:49 PM
Answer

Nha Duong

Rank: New Member

Posts: 24

Join Date: February 20, 2014

Recent Posts

Thank Bruno!
I done!
1NSString *className =@"com.liferay.portlet.journal.util.comparator.ArticleCreateDateComparator";