a) I cannot find a setterXXX for associating an existing com.liferay.portal.Layout with my custom entity com.sample.page.PVersion.
I suppose there should be some configuration that should be added to the com.liferay.portal.Layout for making my mapping work.
But com.liferay.portal.Layout is an existing entity configured in <LIFERAY_PORTAL_ROOT>/portal-impl/src/com/liferay/portal/service.xml. And it is available in my classpath so I cannot modify it.
So how to achieve the above mentioned configuration, in case my assumption is correct? If my assumption is wrong, then please
guide me with the correct approach for achieving my desired requirement as mentioned above.
b) I cannot see any column named "plid" in CREATE STATEMENT in tables.sql shown above.Any specific reason in not including a foreign key constraint in the create clause? If it is not appended in the CREATE clause then how this constraint gets applied?
The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
I'm having the same problem and I'm looking for the same solution....
Please, anyone can help us ??
Thank you in advance !
Joined: Dec 28, 2004
With all the explorings done till date with Liferay what I think is it is a limitation in Liferay' Service Builder framework to define relationships between
user-defined custom entities and Liferay Portal's entities.
Of course, the relationships can be defined between user-defined custom entities in a given service.xml and it would generate the proper code.
However, what I have found is that though Liferay uses ORM framework (Hibernate) underneath its Persistent mechanism, the relationships and constraints
are not managed in the way it gets managed when using Hibernate itself at the Persistent layer.For instance on deleting a related entity
Liferay doesn't complain that there is an associated record in the related table, please delete that first.Above all looking at the Liferay's
Portal's implemented source code though they define a relationship between tables but sets the foreign key manually in the entity i.e. for instance,
a) EntityA and EntityB are related.
b) EntityB holds the primary key of EntityA as its foriegn key
c) What Liferay implementation does is it sets the foreign key manually which is contrary to the way relationships are managed when using Hibernate directly.
I may be wrong on my above findings but above is what I have observed while implementing portlets using Liferay and thought it would be good to share and
get comments from experts and others who are working on application involving Liferay.If I am wrong that somebody shall correct me and if I am correct then it might help somebody.