Fórum

How can I use my own custom table instead of user_ table in liferay?

thumbnail
Tanaji M. Londhe, modificado 11 Anos atrás.

How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
I want to create my own table for user_ table (which is liferay created automatically).
Here I want to store all inforamation of user_ table into my custom created table.
thumbnail
srikanth a, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 144 Data de Entrada: 21/02/11 Postagens Recentes
Hi Tanaji,
Is there any specific reason for you to store the information into the custom table?
Do you want to rename the table name?
Do you want to add more fields into it?

If you can share more details then it will be easy to analyze it.

regards
Sri
thumbnail
Tanaji M. Londhe, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
Hi Srikanth,
Thanks for reply.
To add more information into automatically created table we can use Liferay Expando.
Here we want to remove unnecessary fields from the table.
How can i remove unnecessary fields from the table.
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
It's not too wise to delete columns from default liferay tables because you'll have to modifiy corresponding programs as well.

That said, just modify liferay's service.xml file and rebuild services and wsdd. As I said above, you'll have to modify program codes
to make liferay build properly.
thumbnail
Tanaji M. Londhe, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
Where I can get all service.xml which is related to tables which is liferay created automatically. I searched in /liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23 but not getting.
Is there any way so i can connect to my custom tables which is not present in liferay tables.
I know the concept of Service Builder using that you can tables, interfaces, services ...etc
thumbnail
srikanth a, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 144 Data de Entrada: 21/02/11 Postagens Recentes
Hi Tanaji,
It is not advisable to change the tables because of the problems which may arise in the java classes.

Where I can get all service.xml which is related to tables which is liferay created automatically. I searched in /liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23 but not getting.
>>>> You find this service xml in the portal source under portal. You modify it and rebuild it.

Is there any way so i can connect to my custom tables which is not present in liferay tables. >>> i didn't get this statement.


regards
Sri
thumbnail
Tanaji M. Londhe, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
Ok. But how can i add my custom tables into liferay.
thumbnail
srikanth a, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 144 Data de Entrada: 21/02/11 Postagens Recentes
Hi Tanaji,
You can add your custom tables through service.xml created in you custom portlet application.

regards
Sri
thumbnail
Tanaji M. Londhe, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
Hi Srikanth,
I am having company table which is created by liferay and aslo having company table which is my custom.
Here I want to compulsary to manage both the table. So how can i sync both the tables in liferay ?
Custom company table having different columns which is not present in company table of a liferay created.
DB name : portalDB (it contains company table)
DB name : customPortalDB (it contains my new custom company table)
thumbnail
Raja Nagendra Kumar, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Expert Postagens: 484 Data de Entrada: 02/03/06 Postagens Recentes
Use the API

http://docs.liferay.com/portal/6.1/javadocs/com/liferay/portlet/expando/service/persistence/ExpandoTableUtil.html

Regards,
Nagendra
thumbnail
Tanaji M. Londhe, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
Here my custom company table is already created manually. Is it right way to use Expando concept, so it will sync both the tables.
thumbnail
Raja Nagendra Kumar, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Expert Postagens: 484 Data de Entrada: 02/03/06 Postagens Recentes
Liferay recommends usage of Expando Approach to add new columns to existing tables, so that, it helps in upgrade/migration etc..

It is ok of having created your table.. but you need to write a syncup logic using the hook or expando api's
http://www.liferay.com/web/juan.fernandez/blog/-/blogs/4746086

My recommendation is re-look at your needs by using the expando concepts, so that you don't have to worry about syncup your self.

Regards,
Nagendra
thumbnail
Tanaji M. Londhe, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
I have custom database like portalCustomDB which contains table name company.
I want to access that company table into my class for perform some CRUD operations on it. How can I acheive this thing?
thumbnail
Mani kandan, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Expert Postagens: 492 Data de Entrada: 15/09/10 Postagens Recentes
If you want add more filed in another table take your own code for adding user with the help of UserServiceUtil.addUser();
thumbnail
Tanaji M. Londhe, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
No. I am not adding any field into liferay's created database. Here I am using my custom database and also want to use my liferay's created database.
Now I want to access data from custom database into my portlet class.
Here I have created tables manually into my custom database. (I am not using service builder to create custom tables)
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Google for "service builder external database" and you'll find your answer.
thumbnail
Tanaji M. Londhe, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
thnx David.
I go through this post http://bairdblog.wordpress.com/2011/02/11/using-liferay-6-0-x-service-builder-with-external-databases/
same thing i implement.
But now i want to perform some CRUD on my custom table which is present in external Database.
Which way i can go ahead ?
thumbnail
Mani kandan, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Expert Postagens: 492 Data de Entrada: 15/09/10 Postagens Recentes
You can get data from multiple database using context.xml file.

Or have a look this link, thread
thumbnail
Tanaji M. Londhe, modificado 11 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
finally I got a sucess. emoticon
Abdul Kaleem, modificado 10 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

New Member Postagens: 6 Data de Entrada: 21/02/13 Postagens Recentes
Tanaji Londhe:
finally I got a sucess. emoticon



Hi Tanaji Londhe,

can you tell us the steps of success you got,

how did you make it work,

thanks
thumbnail
Tanaji Londhe, modificado 10 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Regular Member Postagens: 194 Data de Entrada: 25/04/12 Postagens Recentes
May I know what is your requirement ?
I have manage Liferay's Company table with my custom Company table using Expando field (used to store custom company id) and perform CRUD operation on it using jdbc.
thumbnail
Bharamani P Tashildar, modificado 8 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Junior Member Postagens: 48 Data de Entrada: 27/08/14 Postagens Recentes
Hi all,

How to add data in liferay user_ table?
thumbnail
Olaf Kock, modificado 8 Anos atrás.

RE: How can I use my own custom table instead of user_ table in liferay?

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
Bharamani P Tashildar:
How to add data in liferay user_ table?


Crossreferencing the answer in this thread. Please don't resurrect old threads by adding a new question to it.

Short answer: You don't modify Liferay's tables - you don't even look at them.