Foros de discusión

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

thumbnail
Tanaji M. Londhe, modificado hace 11 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
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 hace 11 años.

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

Regular Member Mensajes: 144 Fecha de incorporación: 21/02/11 Mensajes recientes
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 hace 11 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
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 hace 11 años.

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

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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 hace 11 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
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 hace 11 años.

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

Regular Member Mensajes: 144 Fecha de incorporación: 21/02/11 Mensajes recientes
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 hace 11 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
Ok. But how can i add my custom tables into liferay.
thumbnail
srikanth a, modificado hace 11 años.

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

Regular Member Mensajes: 144 Fecha de incorporación: 21/02/11 Mensajes recientes
Hi Tanaji,
You can add your custom tables through service.xml created in you custom portlet application.

regards
Sri
thumbnail
Tanaji M. Londhe, modificado hace 11 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
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 hace 11 años.

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

Expert Mensajes: 484 Fecha de incorporación: 2/03/06 Mensajes recientes
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 hace 11 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
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 hace 11 años.

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

Expert Mensajes: 484 Fecha de incorporación: 2/03/06 Mensajes recientes
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 hace 11 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
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 hace 11 años.

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

Expert Mensajes: 492 Fecha de incorporación: 15/09/10 Mensajes recientes
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 hace 11 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
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 hace 11 años.

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

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Google for "service builder external database" and you'll find your answer.
thumbnail
Tanaji M. Londhe, modificado hace 11 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
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 hace 11 años.

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

Expert Mensajes: 492 Fecha de incorporación: 15/09/10 Mensajes recientes
You can get data from multiple database using context.xml file.

Or have a look this link, thread
thumbnail
Tanaji M. Londhe, modificado hace 11 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
finally I got a sucess. emoticon
Abdul Kaleem, modificado hace 10 años.

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

New Member Mensajes: 6 Fecha de incorporación: 21/02/13 Mensajes recientes
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 hace 10 años.

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

Regular Member Mensajes: 194 Fecha de incorporación: 25/04/12 Mensajes recientes
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 hace 8 años.

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

Junior Member Mensajes: 48 Fecha de incorporación: 27/08/14 Mensajes recientes
Hi all,

How to add data in liferay user_ table?
thumbnail
Olaf Kock, modificado hace 8 años.

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

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
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.