留言板

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

thumbnail
Tanaji M. Londhe,修改在11 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
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,修改在11 年前。

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

Regular Member 帖子: 144 加入日期: 11-2-21 最近的帖子
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,修改在11 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
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,修改在11 年前。

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

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
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,修改在11 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
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,修改在11 年前。

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

Regular Member 帖子: 144 加入日期: 11-2-21 最近的帖子
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,修改在11 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
Ok. But how can i add my custom tables into liferay.
thumbnail
srikanth a,修改在11 年前。

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

Regular Member 帖子: 144 加入日期: 11-2-21 最近的帖子
Hi Tanaji,
You can add your custom tables through service.xml created in you custom portlet application.

regards
Sri
thumbnail
Tanaji M. Londhe,修改在11 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
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,修改在11 年前。

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

Expert 帖子: 484 加入日期: 06-3-2 最近的帖子
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,修改在11 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
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,修改在11 年前。

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

Expert 帖子: 484 加入日期: 06-3-2 最近的帖子
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,修改在11 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
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,修改在11 年前。

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

Expert 帖子: 492 加入日期: 10-9-15 最近的帖子
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,修改在11 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
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,修改在11 年前。

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

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Google for "service builder external database" and you'll find your answer.
thumbnail
Tanaji M. Londhe,修改在11 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
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,修改在11 年前。

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

Expert 帖子: 492 加入日期: 10-9-15 最近的帖子
You can get data from multiple database using context.xml file.

Or have a look this link, thread
thumbnail
Tanaji M. Londhe,修改在11 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
finally I got a sucess. emoticon
Abdul Kaleem,修改在10 年前。

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

New Member 帖子: 6 加入日期: 13-2-21 最近的帖子
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,修改在10 年前。

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

Regular Member 帖子: 194 加入日期: 12-4-25 最近的帖子
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,修改在8 年前。

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

Junior Member 帖子: 48 加入日期: 14-8-27 最近的帖子
Hi all,

How to add data in liferay user_ table?
thumbnail
Olaf Kock,修改在8 年前。

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

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
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.