Fórumok

description relation one - many or one-one

thumbnail
maryam maryam masoudy, módosítva 12 év-val korábban

description relation one - many or one-one

Regular Member Bejegyzések: 149 Csatlakozás dátuma: 2011.10.30. Legújabb bejegyzések
hi friends
i have simple question
i want to description relation one - many between tables in Liferay MVC portlet
how to description relation one -many or one-one in my code(Liferay MVC portlet)? (not in database)
thumbnail
maryam maryam masoudy, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Regular Member Bejegyzések: 149 Csatlakozás dátuma: 2011.10.30. Legújabb bejegyzések
if it doesn't possible in Liferay MVC portlet, please say me
thumbnail
Javad Eslamirad, módosítva 12 év-val korábban

RE: description relation one - many or one-one

New Member Bejegyzések: 13 Csatlakozás dátuma: 2011.12.18. Legújabb bejegyzések
hi
you can use service builder for create relation in your mvc portlet
Service builder is very power full tools from liferay for generate low level class in mvc pattern
thumbnail
maryam maryam masoudy, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Regular Member Bejegyzések: 149 Csatlakozás dátuma: 2011.10.30. Legújabb bejegyzések
hi javad , Hitoshi
thanks for reply
i don't about Service builder
i copy sample code in one portlet and run service.xml after run generae pack and one class but in class has errors
i use eclipse ide and use sample code in created service.xml but this sample has error
i search on internet but and see

http://www.liferay.com/community/forums/-/message_boards/message/8196632?_19_preview=false
but i don't learn and know about
i know:
1- i new one service builder after new service builder create on file named service.xml
2- in the service.xml define my table and its fields and relation
i don't know about:

1- don't how to use or run from this file (service.xml) correctly
2- does this file (service.xml) generate getter or seter file ?
3- does this file (service.xml) generate tables in my database?
thumbnail
Raja Seth, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Regular Member Bejegyzések: 233 Csatlakozás dátuma: 2011.08.18. Legújabb bejegyzések
Hi Maryam,

When you build service all the classes are created also impl, persistance, etc. Also one sql folder is created inside "[Your-Portlet-location]/docroot/WEB-INF" folder, where you can see the tables, indexes, sequences sql files.
Now when you ant-built(or deploy) your portlet it generate tables in my database.

Also getter n setter methods are created inside "src/com.../model/impl" there is one ***ModelImpl.java class, where you can find the getter/setter methods.

Regards,
Raja
thumbnail
maryam maryam masoudy, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Regular Member Bejegyzések: 149 Csatlakozás dátuma: 2011.10.30. Legújabb bejegyzések
hi Raja
ok
i create on simple portlet with ide eclipse (with out enythings)
i create service.xml and use sample code but i have problem and it doesnot create mpl, persistance, etc and sql file
what do i do work?

i test other code but i donot get corect result
thumbnail
Raja Seth, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Regular Member Bejegyzések: 233 Csatlakozás dátuma: 2011.08.18. Legújabb bejegyzések
Hi Maryam,

Steps which you have shown are correct. I too created sample portlet and run the service-builder its working fine as per the scenario. Check with your Liferay IDE. Have you created any sample portlet before with Liferay IDE? If not try this scenario with normal eclipse.

Regards,
Raja
thumbnail
maryam maryam masoudy, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Regular Member Bejegyzések: 149 Csatlakozás dátuma: 2011.10.30. Legújabb bejegyzések
yes i work with ide and test other portlet but i donot work with service.xml
if you have simple sample portlet that use service .xml and u are certien please send me
thumbnail
Raja Seth, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Regular Member Bejegyzések: 233 Csatlakozás dátuma: 2011.08.18. Legújabb bejegyzések
Hi Maryam,

Zip file attached of the portlet created for liferay service.

Regards,
Raja
thumbnail
maryam maryam masoudy, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Regular Member Bejegyzések: 149 Csatlakozás dátuma: 2011.10.30. Legújabb bejegyzések
hi Raja
very thanks i am glad for your help
you made me happyemoticon
regardemoticonemoticon
thumbnail
maryam maryam masoudy, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Regular Member Bejegyzések: 149 Csatlakozás dátuma: 2011.10.30. Legújabb bejegyzések
i import your portlet in my eclipse but if build service.xml i have errors
if i want build (or run) service.xml what do i do? (without eclipse ide)
Raja please add me or if u like to send for me gmail id beacause is faster
how to build your file? with buttom show in picture 3 ?
in your sample , u use spring or hibernate?
thumbnail
Raja Seth, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Regular Member Bejegyzések: 233 Csatlakozás dátuma: 2011.08.18. Legújabb bejegyzések
Hi,

- If you are using normal eclipse, you can right click on build.xml and run as ant built.
- If you are going through command prompt go to your portlet path, for example "D:\liferay-developer-studio\examples-plugins-sdk\portlets\sample1-portlet>"
and do ant build-service.

Liferay by itself uses hibernate platform as liferay-service. My portlet is normal MVC portlet.
thumbnail
Hitoshi Ozawa, módosítva 12 év-val korábban

RE: description relation one - many or one-one

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
Have you tried googling your question: Liferay service builder one to many

Example of a thread:
http://www.liferay.com/community/forums/-/message_boards/message/8196632?_19_preview=false