Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How to call PL/SQL function inside column in entity

Avatar

Level 1

Hello,

How can I do next:

- Crete entity from existing table in database, but one column in the table gets value from function. Function is written in oracle PL/SQL language and it is located inside some package on database.

Application should run LCDS3 and tomcat.


All help is appricitated

3 Replies

Avatar

Former Community Member

Not sure I understand the problem. LCDS works will work just fine as long as the table and its columns are visible to the JDBC connection.

Have you used LCDS and are you facing any specific problems? It will be great if you could provide more context.

Thanks

Anil

Avatar

Level 1

Anil,

I'm using LCDS3, and here is what I trying to do (for example):

- I have on Oracle DB table REGION, with columns: Code, State, Population.
- I want to create entity that contains same columns as table REGION (Code, State, Population) and to have addition column RegionName witch get value from PL/SQL function (loacated in package "common" on DB) "common.fgetRegionName(Code)".

Can you explain me how to create that entity.

Thanks

Almir

Avatar

Former Community Member

Is that custom column backed by a PL/SQL function shown as a column in the database? If not, you can always create a derived property, This derived property has to have an expression that uses a server side function - this is just a java class. You can write your custom code to read data from the database PL/SQL function.

Anil