You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Midhat Ali <mi...@gmail.com> on 2006/07/27 12:42:24 UTC

Deleting Items

It might seem trivial, but i cant find any option to delete certain items
like Parties and Tax Authorities. and there are more which i dont remember
right now. How it can be done

Re: Deleting Items

Posted by Jacques Le Roux <ja...@les7arts.com>.
ant clean-data.is also working with HSQL (faster for test and dev, maybe weaker : problems have been reported earlier)

Jacques

----- Original Message ----- 
From: "BJ Freeman" <bj...@free-man.net>
To: <of...@incubator.apache.org>
Sent: Saturday, July 29, 2006 7:22 AM
Subject: Re: Deleting Items


> I am not sure what to do with mysql.
> to answer the rest.
> if you read the production setup pdf,
> it will show you how to initialize with seed data.
> the seed data has the admin account in it.
> Might i suggest while you are testing or developing to use the default 
> db. then you can use the ant clean-data.
> 
> 
> Midhat Ali sent the following on 7/28/2006 10:15 PM:
> > i am using MySQL and i do added a lot of test data in the system. also if i
> > do the clean data, will i lose the admin account?. How about  i delete and
> > recreate my mySQL schema, how will i get the admin account back to start
> > again
> > 
> > On 7/29/06, BJ Freeman <bj...@free-man.net> wrote:
> >>
> >> assuming your using the default dB and you don't have any custom data in
> >> the DB you can do an
> >> ant clean-data
> >> this completely wipes out the database to so you can rebuild it fresh.
> >>
> >> Midhat Ali sent the following on 7/28/2006 9:47 PM:
> >> > okay how do i expire a party, and remove unwanted tax authorities.
> >> Rather i
> >> > would lke to remove all demo data and start afresh with only the admin
> >> > account. how do i do that
> >> >
> >> > On 7/28/06, Oleg Kozyrev Jr. <o....@mail.ru> wrote:
> >> >>
> >> >>
> >> >> As far as I remember I can delete entities using, for example:
> >> >>
> >> >> delegator.removeValue(GenericValue value);
> >> >> or
> >> >> delegator.removeByPrimaryKey(GenericPK key);
> >> >> etc.
> >> >>
> >> >> but, to do so you must have all relations to this entity be 
> >> terminated.
> >> >>
> >> >> For example, in Webtools/Entity Data Maintenance you can create new
> >> party
> >> >> entity and delete it afterwards, but if you try to delete 'admin' 
> >> party
> >> >> you
> >> >> get an error, because there are a lot of relations to it from other
> >> >> entities.
> >> >>
> >> >> But, in most cases, as Jacques said, it's better to use 'expire'
> >> option,
> >> >> because it won't remove any data about the entity, but it will mark it
> >> as
> >> >> "deleted" if you want.
> >> >>
> >> >> Oleg.
> >> >>
> >> >>
> >> >>
> >> >> jacques.le.roux wrote:
> >> >> >
> >> >> > From: "Midhat Ali" <mi...@gmail.com>
> >> >> >> It might seem trivial, but i cant find any option to delete certain
> >> >> items
> >> >> >> like Parties and Tax Authorities. and there are more which i dont
> >> >> >> remember
> >> >> >> right now. How it can be done
> >> >> >
> >> >> > For the moment, there is no option to do this sort of thing 
> >> (Entities
> >> >> > can't be suppressed). But there is possiblities here and there
> >> >> > (like in party profile for instance) to use "Expire".
> >> >> >
> >> >> > This is for miscelaneous reasons, notably audit...
> >> >> >
> >> >> > Jacques
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >> http://www.nabble.com/Deleting-Items-tf2008864.html#a5534052
> >> >> Sent from the OFBiz - User forum at Nabble.com.
> >> >>
> >> >>
> >> >
> >>
> >

Re: Deleting Items

Posted by BJ Freeman <bj...@free-man.net>.
I am not sure what to do with mysql.
to answer the rest.
if you read the production setup pdf,
it will show you how to initialize with seed data.
the seed data has the admin account in it.
Might i suggest while you are testing or developing to use the default 
db. then you can use the ant clean-data.


Midhat Ali sent the following on 7/28/2006 10:15 PM:
> i am using MySQL and i do added a lot of test data in the system. also if i
> do the clean data, will i lose the admin account?. How about  i delete and
> recreate my mySQL schema, how will i get the admin account back to start
> again
> 
> On 7/29/06, BJ Freeman <bj...@free-man.net> wrote:
>>
>> assuming your using the default dB and you don't have any custom data in
>> the DB you can do an
>> ant clean-data
>> this completely wipes out the database to so you can rebuild it fresh.
>>
>> Midhat Ali sent the following on 7/28/2006 9:47 PM:
>> > okay how do i expire a party, and remove unwanted tax authorities.
>> Rather i
>> > would lke to remove all demo data and start afresh with only the admin
>> > account. how do i do that
>> >
>> > On 7/28/06, Oleg Kozyrev Jr. <o....@mail.ru> wrote:
>> >>
>> >>
>> >> As far as I remember I can delete entities using, for example:
>> >>
>> >> delegator.removeValue(GenericValue value);
>> >> or
>> >> delegator.removeByPrimaryKey(GenericPK key);
>> >> etc.
>> >>
>> >> but, to do so you must have all relations to this entity be 
>> terminated.
>> >>
>> >> For example, in Webtools/Entity Data Maintenance you can create new
>> party
>> >> entity and delete it afterwards, but if you try to delete 'admin' 
>> party
>> >> you
>> >> get an error, because there are a lot of relations to it from other
>> >> entities.
>> >>
>> >> But, in most cases, as Jacques said, it's better to use 'expire'
>> option,
>> >> because it won't remove any data about the entity, but it will mark it
>> as
>> >> "deleted" if you want.
>> >>
>> >> Oleg.
>> >>
>> >>
>> >>
>> >> jacques.le.roux wrote:
>> >> >
>> >> > From: "Midhat Ali" <mi...@gmail.com>
>> >> >> It might seem trivial, but i cant find any option to delete certain
>> >> items
>> >> >> like Parties and Tax Authorities. and there are more which i dont
>> >> >> remember
>> >> >> right now. How it can be done
>> >> >
>> >> > For the moment, there is no option to do this sort of thing 
>> (Entities
>> >> > can't be suppressed). But there is possiblities here and there
>> >> > (like in party profile for instance) to use "Expire".
>> >> >
>> >> > This is for miscelaneous reasons, notably audit...
>> >> >
>> >> > Jacques
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/Deleting-Items-tf2008864.html#a5534052
>> >> Sent from the OFBiz - User forum at Nabble.com.
>> >>
>> >>
>> >
>>
> 

Re: Deleting Items

Posted by Midhat Ali <mi...@gmail.com>.
i am using MySQL and i do added a lot of test data in the system. also if i
do the clean data, will i lose the admin account?. How about  i delete and
recreate my mySQL schema, how will i get the admin account back to start
again

On 7/29/06, BJ Freeman <bj...@free-man.net> wrote:
>
> assuming your using the default dB and you don't have any custom data in
> the DB you can do an
> ant clean-data
> this completely wipes out the database to so you can rebuild it fresh.
>
> Midhat Ali sent the following on 7/28/2006 9:47 PM:
> > okay how do i expire a party, and remove unwanted tax authorities.
> Rather i
> > would lke to remove all demo data and start afresh with only the admin
> > account. how do i do that
> >
> > On 7/28/06, Oleg Kozyrev Jr. <o....@mail.ru> wrote:
> >>
> >>
> >> As far as I remember I can delete entities using, for example:
> >>
> >> delegator.removeValue(GenericValue value);
> >> or
> >> delegator.removeByPrimaryKey(GenericPK key);
> >> etc.
> >>
> >> but, to do so you must have all relations to this entity be terminated.
> >>
> >> For example, in Webtools/Entity Data Maintenance you can create new
> party
> >> entity and delete it afterwards, but if you try to delete 'admin' party
> >> you
> >> get an error, because there are a lot of relations to it from other
> >> entities.
> >>
> >> But, in most cases, as Jacques said, it's better to use 'expire'
> option,
> >> because it won't remove any data about the entity, but it will mark it
> as
> >> "deleted" if you want.
> >>
> >> Oleg.
> >>
> >>
> >>
> >> jacques.le.roux wrote:
> >> >
> >> > From: "Midhat Ali" <mi...@gmail.com>
> >> >> It might seem trivial, but i cant find any option to delete certain
> >> items
> >> >> like Parties and Tax Authorities. and there are more which i dont
> >> >> remember
> >> >> right now. How it can be done
> >> >
> >> > For the moment, there is no option to do this sort of thing (Entities
> >> > can't be suppressed). But there is possiblities here and there
> >> > (like in party profile for instance) to use "Expire".
> >> >
> >> > This is for miscelaneous reasons, notably audit...
> >> >
> >> > Jacques
> >> >
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Deleting-Items-tf2008864.html#a5534052
> >> Sent from the OFBiz - User forum at Nabble.com.
> >>
> >>
> >
>

Re: Deleting Items

Posted by BJ Freeman <bj...@free-man.net>.
assuming your using the default dB and you don't have any custom data in 
the DB you can do an
ant clean-data
this completely wipes out the database to so you can rebuild it fresh.

Midhat Ali sent the following on 7/28/2006 9:47 PM:
> okay how do i expire a party, and remove unwanted tax authorities. Rather i
> would lke to remove all demo data and start afresh with only the admin
> account. how do i do that
> 
> On 7/28/06, Oleg Kozyrev Jr. <o....@mail.ru> wrote:
>>
>>
>> As far as I remember I can delete entities using, for example:
>>
>> delegator.removeValue(GenericValue value);
>> or
>> delegator.removeByPrimaryKey(GenericPK key);
>> etc.
>>
>> but, to do so you must have all relations to this entity be terminated.
>>
>> For example, in Webtools/Entity Data Maintenance you can create new party
>> entity and delete it afterwards, but if you try to delete 'admin' party
>> you
>> get an error, because there are a lot of relations to it from other
>> entities.
>>
>> But, in most cases, as Jacques said, it's better to use 'expire' option,
>> because it won't remove any data about the entity, but it will mark it as
>> "deleted" if you want.
>>
>> Oleg.
>>
>>
>>
>> jacques.le.roux wrote:
>> >
>> > From: "Midhat Ali" <mi...@gmail.com>
>> >> It might seem trivial, but i cant find any option to delete certain
>> items
>> >> like Parties and Tax Authorities. and there are more which i dont
>> >> remember
>> >> right now. How it can be done
>> >
>> > For the moment, there is no option to do this sort of thing (Entities
>> > can't be suppressed). But there is possiblities here and there
>> > (like in party profile for instance) to use "Expire".
>> >
>> > This is for miscelaneous reasons, notably audit...
>> >
>> > Jacques
>> >
>> >
>> >
>> >
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Deleting-Items-tf2008864.html#a5534052
>> Sent from the OFBiz - User forum at Nabble.com.
>>
>>
> 

Re: Deleting Items

Posted by Midhat Ali <mi...@gmail.com>.
okay how do i expire a party, and remove unwanted tax authorities. Rather i
would lke to remove all demo data and start afresh with only the admin
account. how do i do that

On 7/28/06, Oleg Kozyrev Jr. <o....@mail.ru> wrote:
>
>
> As far as I remember I can delete entities using, for example:
>
> delegator.removeValue(GenericValue value);
> or
> delegator.removeByPrimaryKey(GenericPK key);
> etc.
>
> but, to do so you must have all relations to this entity be terminated.
>
> For example, in Webtools/Entity Data Maintenance you can create new party
> entity and delete it afterwards, but if you try to delete 'admin' party
> you
> get an error, because there are a lot of relations to it from other
> entities.
>
> But, in most cases, as Jacques said, it's better to use 'expire' option,
> because it won't remove any data about the entity, but it will mark it as
> "deleted" if you want.
>
> Oleg.
>
>
>
> jacques.le.roux wrote:
> >
> > From: "Midhat Ali" <mi...@gmail.com>
> >> It might seem trivial, but i cant find any option to delete certain
> items
> >> like Parties and Tax Authorities. and there are more which i dont
> >> remember
> >> right now. How it can be done
> >
> > For the moment, there is no option to do this sort of thing (Entities
> > can't be suppressed). But there is possiblities here and there
> > (like in party profile for instance) to use "Expire".
> >
> > This is for miscelaneous reasons, notably audit...
> >
> > Jacques
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Deleting-Items-tf2008864.html#a5534052
> Sent from the OFBiz - User forum at Nabble.com.
>
>

Re: Deleting Items

Posted by "Oleg Kozyrev Jr." <o....@mail.ru>.
As far as I remember I can delete entities using, for example:

delegator.removeValue(GenericValue value);
or 
delegator.removeByPrimaryKey(GenericPK key);
etc.

but, to do so you must have all relations to this entity be terminated.

For example, in Webtools/Entity Data Maintenance you can create new party
entity and delete it afterwards, but if you try to delete 'admin' party you
get an error, because there are a lot of relations to it from other
entities.

But, in most cases, as Jacques said, it's better to use 'expire' option,
because it won't remove any data about the entity, but it will mark it as
"deleted" if you want.

Oleg.



jacques.le.roux wrote:
> 
> From: "Midhat Ali" <mi...@gmail.com>
>> It might seem trivial, but i cant find any option to delete certain items
>> like Parties and Tax Authorities. and there are more which i dont
>> remember
>> right now. How it can be done
> 
> For the moment, there is no option to do this sort of thing (Entities
> can't be suppressed). But there is possiblities here and there
> (like in party profile for instance) to use "Expire".
> 
> This is for miscelaneous reasons, notably audit...
> 
> Jacques
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Deleting-Items-tf2008864.html#a5534052
Sent from the OFBiz - User forum at Nabble.com.


Re: Deleting Items

Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "Midhat Ali" <mi...@gmail.com>
> It might seem trivial, but i cant find any option to delete certain items
> like Parties and Tax Authorities. and there are more which i dont remember
> right now. How it can be done

For the moment, there is no option to do this sort of thing (Entities can't be suppressed). But there is possiblities here and there
(like in party profile for instance) to use "Expire".

This is for miscelaneous reasons, notably audit...

Jacques