Forums de discussion

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

thumbnail
Tanaji M. Londhe, modifié il y a 11 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
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, modifié il y a 11 années.

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

Regular Member Publications: 144 Date d'inscription: 21/02/11 Publications récentes
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, modifié il y a 11 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
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, modifié il y a 11 années.

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

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
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, modifié il y a 11 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
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, modifié il y a 11 années.

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

Regular Member Publications: 144 Date d'inscription: 21/02/11 Publications récentes
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, modifié il y a 11 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
Ok. But how can i add my custom tables into liferay.
thumbnail
srikanth a, modifié il y a 11 années.

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

Regular Member Publications: 144 Date d'inscription: 21/02/11 Publications récentes
Hi Tanaji,
You can add your custom tables through service.xml created in you custom portlet application.

regards
Sri
thumbnail
Tanaji M. Londhe, modifié il y a 11 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
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, modifié il y a 11 années.

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

Expert Publications: 484 Date d'inscription: 02/03/06 Publications récentes
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, modifié il y a 11 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
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, modifié il y a 11 années.

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

Expert Publications: 484 Date d'inscription: 02/03/06 Publications récentes
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, modifié il y a 11 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
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, modifié il y a 11 années.

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

Expert Publications: 492 Date d'inscription: 15/09/10 Publications récentes
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, modifié il y a 11 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
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, modifié il y a 11 années.

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

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
Google for "service builder external database" and you'll find your answer.
thumbnail
Tanaji M. Londhe, modifié il y a 11 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
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, modifié il y a 11 années.

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

Expert Publications: 492 Date d'inscription: 15/09/10 Publications récentes
You can get data from multiple database using context.xml file.

Or have a look this link, thread
thumbnail
Tanaji M. Londhe, modifié il y a 11 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
finally I got a sucess. emoticon
Abdul Kaleem, modifié il y a 10 années.

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

New Member Publications: 6 Date d'inscription: 21/02/13 Publications récentes
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, modifié il y a 10 années.

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

Regular Member Publications: 194 Date d'inscription: 25/04/12 Publications récentes
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, modifié il y a 8 années.

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

Junior Member Publications: 48 Date d'inscription: 27/08/14 Publications récentes
Hi all,

How to add data in liferay user_ table?
thumbnail
Olaf Kock, modifié il y a 8 années.

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

Liferay Legend Publications: 6403 Date d'inscription: 23/09/08 Publications récentes
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.