OQL Queries

0
I have added OQL module in my existing application and trying to get the data as per OQL but its not returning any data and instead of giving me error of Contact you admistrator . Dont know where i am getting wrong. Can some one please guide me , how I can integrate OQL module to my existing application.
asked
2 answers
1

hii Akhil Gonde,

you made mistake in OQL syntax please check , if could not find 

please share your Domain model pic and query.

answered
0

Sure. Check the example given in the OQL-module: “DS_ExampleOQL”:

The ExecuteOQL activity executes the OQLString 

'SELECT 
	P.id ExamplePersonResult_ExamplePerson,
	(SELECT id FROM OQL.ExamplePerson M WHERE M.Number = P.MarriedTo) MarriedTo,
	P.Name Name,
	P.Number Number,
	P.DateOfBirth DateOfBirth,
	P.Age Age,
	P.LongAge LongAge,
	P.HeightInDecimal HeightInDecimal,
	P.Active Active,
	P.Gender Gender
FROM
	OQL.ExamplePerson P'

and returns the found objects as a list of ExamplePersonResult, which you can find in the domainmodel:

For documentation, have a look the ref-guide that Nico Mouton mentions

For testing OQL-strings in a playground, see service.mendixcloud.com/p/OQL

 

answered