You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Pedro Lopes <ge...@pedropalacios.net> on 2015/12/28 13:15:37 UTC

Question about data model

Hello all,

Data model question: There isn't a foreign key between the tables
SECURITY_PERMISSION and SECURITY_GROUP_PERMISSION, is this table not to
relate the table SECURITY_PERMISSION with SECURITY_GROUP?

Thank you all very much,

Pedro

Re: Question about data model

Posted by Taher Alkhateeb <sl...@gmail.com>.
Ahh you're right I did not pay attention to one-nofk setup. I just looked
at the relationship.

Thanks Scott and sorry Pedro, but now you got the answer.

Taher Alkhateeb

On Wednesday, 30 December 2015, Scott Gray <sc...@hotwaxsystems.com>
wrote:

> That's incorrect, there is no foreign-key dependency between
> SecurityGroupPermission and SecurityPermission and this is done on purpose.
>
> Here's an old discussion on the topic:
> http://ofbiz.135035.n4.nabble.com/security-permission-td154203.html#a154208
>
> Regards
> Scott
>
> On 29 December 2015 at 05:06, Taher Alkhateeb <slidingfilaments@gmail.com
> <javascript:;>>
> wrote:
>
> > Hi Pedro,
> >
> > I would assume the problem is in your migration process. Do you face the
> > same thing on a fresh new database? If no, then you need to check what
> went
> > wrong with your migration.
> >
> > Taher Alkhateeb
> >
> > On Mon, Dec 28, 2015 at 6:59 PM, Pedro Lopes <geral@pedropalacios.net
> <javascript:;>>
> > wrote:
> >
> > > Hello all,
> > >
> > > Taher, thank you very much for your reply.
> > >
> > > OK, is that relationship supposed to be on the database also? I
> migrated
> > to
> > > mysql and did not find it there.
> > >
> > > Thank you for your attention,
> > >
> > > Pedro
> > >
> > > On Mon, Dec 28, 2015 at 1:24 PM, Taher Alkhateeb <
> > > slidingfilaments@gmail.com <javascript:;>
> > > > wrote:
> > >
> > > > Hi Pedro,
> > > >
> > > > The SecurityGroupPermission entity has a foreign key to both
> > > > SecurityPermission and SecurityGroup. You can check the entity
> > definition
> > > > in framework/security/entitydef/entitymodel.xml. This is because the
> > > > SecurityGroupPermissions is a relationship entity (many to many)
> > > >
> > > > Taher Alkhateeb
> > > >
> > > > On Mon, Dec 28, 2015 at 3:15 PM, Pedro Lopes <
> geral@pedropalacios.net <javascript:;>>
> > > > wrote:
> > > >
> > > > > Hello all,
> > > > >
> > > > > Data model question: There isn't a foreign key between the tables
> > > > > SECURITY_PERMISSION and SECURITY_GROUP_PERMISSION, is this table
> not
> > to
> > > > > relate the table SECURITY_PERMISSION with SECURITY_GROUP?
> > > > >
> > > > > Thank you all very much,
> > > > >
> > > > > Pedro
> > > > >
> > > >
> > >
> >
>

Re: Question about data model

Posted by Scott Gray <sc...@hotwaxsystems.com>.
That's incorrect, there is no foreign-key dependency between
SecurityGroupPermission and SecurityPermission and this is done on purpose.

Here's an old discussion on the topic:
http://ofbiz.135035.n4.nabble.com/security-permission-td154203.html#a154208

Regards
Scott

On 29 December 2015 at 05:06, Taher Alkhateeb <sl...@gmail.com>
wrote:

> Hi Pedro,
>
> I would assume the problem is in your migration process. Do you face the
> same thing on a fresh new database? If no, then you need to check what went
> wrong with your migration.
>
> Taher Alkhateeb
>
> On Mon, Dec 28, 2015 at 6:59 PM, Pedro Lopes <ge...@pedropalacios.net>
> wrote:
>
> > Hello all,
> >
> > Taher, thank you very much for your reply.
> >
> > OK, is that relationship supposed to be on the database also? I migrated
> to
> > mysql and did not find it there.
> >
> > Thank you for your attention,
> >
> > Pedro
> >
> > On Mon, Dec 28, 2015 at 1:24 PM, Taher Alkhateeb <
> > slidingfilaments@gmail.com
> > > wrote:
> >
> > > Hi Pedro,
> > >
> > > The SecurityGroupPermission entity has a foreign key to both
> > > SecurityPermission and SecurityGroup. You can check the entity
> definition
> > > in framework/security/entitydef/entitymodel.xml. This is because the
> > > SecurityGroupPermissions is a relationship entity (many to many)
> > >
> > > Taher Alkhateeb
> > >
> > > On Mon, Dec 28, 2015 at 3:15 PM, Pedro Lopes <ge...@pedropalacios.net>
> > > wrote:
> > >
> > > > Hello all,
> > > >
> > > > Data model question: There isn't a foreign key between the tables
> > > > SECURITY_PERMISSION and SECURITY_GROUP_PERMISSION, is this table not
> to
> > > > relate the table SECURITY_PERMISSION with SECURITY_GROUP?
> > > >
> > > > Thank you all very much,
> > > >
> > > > Pedro
> > > >
> > >
> >
>

Re: Question about data model

Posted by Taher Alkhateeb <sl...@gmail.com>.
Hi Pedro,

I would assume the problem is in your migration process. Do you face the
same thing on a fresh new database? If no, then you need to check what went
wrong with your migration.

Taher Alkhateeb

On Mon, Dec 28, 2015 at 6:59 PM, Pedro Lopes <ge...@pedropalacios.net>
wrote:

> Hello all,
>
> Taher, thank you very much for your reply.
>
> OK, is that relationship supposed to be on the database also? I migrated to
> mysql and did not find it there.
>
> Thank you for your attention,
>
> Pedro
>
> On Mon, Dec 28, 2015 at 1:24 PM, Taher Alkhateeb <
> slidingfilaments@gmail.com
> > wrote:
>
> > Hi Pedro,
> >
> > The SecurityGroupPermission entity has a foreign key to both
> > SecurityPermission and SecurityGroup. You can check the entity definition
> > in framework/security/entitydef/entitymodel.xml. This is because the
> > SecurityGroupPermissions is a relationship entity (many to many)
> >
> > Taher Alkhateeb
> >
> > On Mon, Dec 28, 2015 at 3:15 PM, Pedro Lopes <ge...@pedropalacios.net>
> > wrote:
> >
> > > Hello all,
> > >
> > > Data model question: There isn't a foreign key between the tables
> > > SECURITY_PERMISSION and SECURITY_GROUP_PERMISSION, is this table not to
> > > relate the table SECURITY_PERMISSION with SECURITY_GROUP?
> > >
> > > Thank you all very much,
> > >
> > > Pedro
> > >
> >
>

Re: Question about data model

Posted by Pedro Lopes <ge...@pedropalacios.net>.
Hello all,

Taher, thank you very much for your reply.

OK, is that relationship supposed to be on the database also? I migrated to
mysql and did not find it there.

Thank you for your attention,

Pedro

On Mon, Dec 28, 2015 at 1:24 PM, Taher Alkhateeb <slidingfilaments@gmail.com
> wrote:

> Hi Pedro,
>
> The SecurityGroupPermission entity has a foreign key to both
> SecurityPermission and SecurityGroup. You can check the entity definition
> in framework/security/entitydef/entitymodel.xml. This is because the
> SecurityGroupPermissions is a relationship entity (many to many)
>
> Taher Alkhateeb
>
> On Mon, Dec 28, 2015 at 3:15 PM, Pedro Lopes <ge...@pedropalacios.net>
> wrote:
>
> > Hello all,
> >
> > Data model question: There isn't a foreign key between the tables
> > SECURITY_PERMISSION and SECURITY_GROUP_PERMISSION, is this table not to
> > relate the table SECURITY_PERMISSION with SECURITY_GROUP?
> >
> > Thank you all very much,
> >
> > Pedro
> >
>

Re: Question about data model

Posted by Taher Alkhateeb <sl...@gmail.com>.
Hi Pedro,

The SecurityGroupPermission entity has a foreign key to both
SecurityPermission and SecurityGroup. You can check the entity definition
in framework/security/entitydef/entitymodel.xml. This is because the
SecurityGroupPermissions is a relationship entity (many to many)

Taher Alkhateeb

On Mon, Dec 28, 2015 at 3:15 PM, Pedro Lopes <ge...@pedropalacios.net>
wrote:

> Hello all,
>
> Data model question: There isn't a foreign key between the tables
> SECURITY_PERMISSION and SECURITY_GROUP_PERMISSION, is this table not to
> relate the table SECURITY_PERMISSION with SECURITY_GROUP?
>
> Thank you all very much,
>
> Pedro
>