In fact, the association is the one club can have many users
I have a main problem in club POJO, is the following correct ? :
@OneToMany(targetEntity=org.appfuse.model.User.class, mappedBy="club")
public Set getUsers()
{
return users;
}
fadhlirahim wrote:
>
> Hello there,
>
Hello there,
A couple of questions. Is the Club class is the owning side of the
association? Does deleting the club will also delete the user?
From what you're trying to do, I understand that you're trying to make a
bidirectional one-to-many/many-to-one association. So IMHO, it will make
much
Here is what I have in club POJO:
@OneToMany(targetEntity=org.appfuse.model.User.class,
cascade=CascadeType.ALL, mappedBy="club", fetch = FetchType.LAZY)
public Set getUsers()
{
return users;
}
Here is what I have in User POJO
@ManyToOne(optional=fal
Here is refference about JPA annotation
http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-annotations.html#OneToMany
here is example:
@Entity
@Table(name="app_user")
public class User extends BaseObject implements Serializable, UserDetails {
...
protected Set e
what's the use of persistence.xml ??
I saw only two following entries in the file, should I add a new entry for
club pojo ?
org.appfuse.model.User
org.appfuse.model.Role
I did try the following way:
In my club POJO, I have
@OneToMany
public Set getUsers()
{
return users;
}
in my user POJO,
Fan,
About 1) in pom.xml there should be
org.appfuse
appfuse-${web.framework}
${appfuse.version}
warpath
org.appfuse
Hey ros:
1)The original pom.xml already has the exclusion :
org.appfuse
appfuse-${web.framework}
${appfuse.version}
warpath
org.appfuse
ap
I know why...it's just because I have got the full source with this "mvn
appfuse:full-source", the definition for the maven-warpath-plugin would not
be there.
If in this case, how am I going to have one to many relationship with the
user pojo ???
Michael Horwitz wrote:
>
> I just checked the
I am really confused. first time I had created a new project,
I noticed that the definition was not there.
Then I deleted the project, created a new project again, to my surprise, the
definition now appears in the pom.xml...
The following is my command, what's the possibilit
I just checked the archetype for AppFuse 2.0M5 Struts 2 Basic and the
definition for the maven-warpath-plugin should definitely be there.
Mike.
On 6/27/07, Fan <[EMAIL PROTECTED]> wrote:
I am using struts basic module.
Strange enough, I cant find the definition in the pom.xml even from a new
I am using struts basic module.
Strange enough, I cant find the definition in the pom.xml even from a new
project I just have built
Michael Horwitz wrote:
>
> For Struts it should look like:
>
>
> org.appfuse
> maven-warpath-plugin
>
For Struts it should look like:
org.appfuse
maven-warpath-plugin
1.0-m5
true
add-classes
Could you please show me the original definition for the warpath plugin in
pom.xml ?
Michael Horwitz wrote:
>
> Have you removed the definition for the warpath plugin in your pom.xml?
> Looks like it is no longer being resolved.
>
> Mike.
>
> On 6/27/07, Fan <[EMAIL PROTECTED]> wrote:
>>
>>
Have you removed the definition for the warpath plugin in your pom.xml?
Looks like it is no longer being resolved.
Mike.
On 6/27/07, Fan <[EMAIL PROTECTED]> wrote:
after I have added the exclusion, I have the following error, where can I
download the missing files ?
D:\source\clubber>mvn cle
after I have added the exclusion, I have the following error, where can I
download the missing files ?
D:\source\clubber>mvn clean compile hibernate3:hbm2ddl
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'hibernate3'.
[INFO]
-
Hi!
You have to exclude AppFuse Data Common Package in your pom.xml. Then add in
to your poroject User and Role pojos at appfuse namespace (as described in
http://www.appfuse.org/display/APF/AppFuse+Core+Classes)
Try to do mvn clean compile hibernate3:hbm2ddl and check database for user
table s
Hey Ros:
I did add the related Object to both hibernate.cfg.xml and
applicationContext.xml. But it just does not work
Or do you mind to show me your hibernate.cfg.xml and applicationContext.xml
? I afraid I might do it wrongly
Is that necessary to exclude the AppFuse Data Common Package ?
ros
Hi!
I resolve that by add my Contact object to both hibernate.cfg.xml and
applicationContext.xml.
Reffer to http://www.appfuse.org/display/APF/AppFuse+Core+Classes
Hope this helps.
ros
Fan wrote:
>
> Ros,
>
> What's the fix ? I am facing the same error as you did
>
>
> ros wrote:
>>
>
Ros,
What's the fix ? I am facing the same error as you did
ros wrote:
>
> Right. Thanks Matt!
>
--
View this message in context:
http://www.nabble.com/override-User-code-class-and-link-OneToMany-to-any-other-class-tf3217084s2369.html#a11289531
Sent from the AppFuse - User mailing list ar
I tried it. But it did not work also.
What other ways I can try ?
Michael Horwitz wrote:
>
> Have you tried using the full class name in the reference? i.e.
> Nope
>
>
> @OneToMany(mappedBy = "com.clubber.model.Club")
>
> I seem to remember a fix of that sort being needed some while ba
Have you tried using the full class name in the reference? i.e.
@OneToMany(mappedBy = "com.clubber.model.Club")
I seem to remember a fix of that sort being needed some while back.
Mike.
On 6/25/07, Fan <[EMAIL PROTECTED]> wrote:
I face the same problem:
In my user POJO, I have:
@ManyToOne
I face the same problem:
In my user POJO, I have:
@ManyToOne
public Club getClub()
{
return club;
}
in my club POJO, I have:
@OneToMany(mappedBy = "club")
public Set getUsers()
{
return users;
}
Here is my hibernate.cfg.xml
Here is m
Right. Thanks Matt!
--
View this message in context:
http://www.nabble.com/override-User-code-class-and-link-OneToMany-to-any-other-class-tf3217084s2369.html#a8935791
Sent from the AppFuse - User mailing list archive at Nabble.com.
---
Did you add your Contact object to both hibernate.cfg.xml and
applicationContext.xml?
Matt
On 2/12/07, ros <[EMAIL PROTECTED]> wrote:
I've done http://www.appfuse.org/display/APF/AppFuse+Core+Classes fine with
basic Appfuse2 Hibernate+Struts, but when I add relation to user core class
(all org
I've done http://www.appfuse.org/display/APF/AppFuse+Core+Classes fine with
basic Appfuse2 Hibernate+Struts, but when I add relation to user core class
(all org.appfuse.model classes are in project):
import com.test.Contact;
...
public class User extends BaseObject implements Serializable, UserD
25 matches
Mail list logo